Created
May 7, 2013 06:03
-
-
Save chakrit/5530541 to your computer and use it in GitHub Desktop.
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
initial before. | |
․initial after. | |
second before. | |
․calling second after. | |
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
// run with `mocha --bail test.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('initial after.'); | |
}); | |
}); | |
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.'); }); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment