Last active
February 24, 2016 09:23
-
-
Save mroderick/13370cb625424304f9af to your computer and use it in GitHub Desktop.
How can I get mocha to fail on exceptions?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('this should cause tests to fail', function(){ | |
// this will cause an exception | |
// causing mocha to ignore this whole file | |
var hello = JSON.parse('{"hello":}'); | |
it('should something', function(){ | |
// magic | |
assert.equal(true, true); | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With vanilla Mocha, this works as expected. With mocha + karma + karma-webpack + webpack, it doesn't.