Closed
Description
I don't think this should be the case? Shouldn't it skip everything else, including befores and afters?
$ mocha --version
1.7.0
$ cat testing/a.js
describe('Initial test', function() {
before(function() {
console.log('initial before');
});
describe('test will fail', function() {
it('will fail', function() {
throw new Error('failed');
});
});
after(function() {
console.log('calling after');
});
});
$ cat testing/b.js
describe('Second test', function() {
before(function() {
console.log('second before');
});
describe('second test does not matter', function() {
it('this test should not run', function() {
throw new Error('I do not matter');
});
});
after(function() {
console.log('calling second after');
});
});
$ mocha --bail testing/
initial before
․calling after
second before // SHOULD NEVER BE CALLED
calling second after // SHOULD NEVER BE CALLED
✖ 1 of 2 tests failed:
1) Initial test test will fail will fail:
Error: failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels