-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
semver-majorimplementation requires increase of "major" version number; "breaking changes"implementation requires increase of "major" version number; "breaking changes"status: accepting prsMocha can use your help with this one!Mocha can use your help with this one!type: buga defect, confirmed by a maintainera defect, confirmed by a maintainer
Milestone
Description
This is a common pattern with tools like sinon or nock - to have afterEach do some standard verification at the end of each test.
I'm fairly sure this used to work - not sure what's changed.
var assert = require('assert');
describe("afterEach", function() {
var verificationFlag;
beforeEach(function() {
verificationFlag = 0;
});
afterEach(function() {
assert.equal(verificationFlag, 1);
});
it("0", function() { })
it("1", function() { verificationFlag = 1 })
it("2", function() { verificationFlag = 2 })
});Expected output: 3 tests, 3 failures
Actual output: 1 test, 1 pass, 1 fail (from hook)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
semver-majorimplementation requires increase of "major" version number; "breaking changes"implementation requires increase of "major" version number; "breaking changes"status: accepting prsMocha can use your help with this one!Mocha can use your help with this one!type: buga defect, confirmed by a maintainera defect, confirmed by a maintainer
Type
Projects
Status
No status