visionmedia/mocha — Issue #270: browser - exceptions thrown in before/beforeEach are ignored
Author: spmason
Created: 2012-02-17 15:16:20+00:00
State: open

I'm finding that exceptions thrown in my before/beforeEach blocks aren't being handled, it's simple enough to reproduce:

mocha.setup('bdd');
describe('testing the tests', function(){
beforeEach(function(){ // also before(),
throw new Error('this should fail');
});

it('Works', function(){
});
});
mocha.run();

This is on the most recent version, 0.12.1 on Chrome 17 and FireFox 10