-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failing async before() (bdd) or suiteSetup() (tdd) reports against the previous suite #119
Comments
appears fine to me: describe('first', function(){
it('should something', function(done){
done()
})
})
describe('second', function(){
before(function(done){
process.nextTick(function(){
throw new Error('failed')
});
})
it('should do something', function(done){
done()
})
}) outputs:
|
did i miss something? |
Your code sample fails for me:
Using mocha 0.3.2, node 0.6.5 on Ubuntu |
which version of mocha? |
0.3.2 |
weiiird... very weird, I get the expected results for node 0.4.x and 0.6.x |
Very strange. I've managed to try it on a few more machines, and it seems to work fine. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you have an asynchronous section in a before() or suiteSetup() that fails, the error is reported against the previous test suite:
TDD ui case
Output
BDD ui test case
Expected results
This is incorrect - and should report that the failure was in the beforeAll hook:
As it does if the error is thrown outside the setTimeout function.
The text was updated successfully, but these errors were encountered: