Exceptions don't cause jasmine to fail.  So you have to write a test that will fail to fail the build.  Throwing the error will just cause a command line message to appear.