-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
type: buga defect, confirmed by a maintainera defect, confirmed by a maintainer
Description
This with Mocha 3.1.2. Source test file:
"use strict";
describe('outer', function() {
beforeEach(function() {
console.log("A");
this.skip();
});
describe('inner', function() {
beforeEach(function() {
console.log("B");
});
it('test case', function() {
console.log("C");
});
afterEach(function() {
console.log("Y");
});
});
afterEach(function() {
console.log("Z");
});
});Expected output: either "B" and "Y" should be printed, or neither "B" nor "Y" should be printed.
Actual output: "B" is printed, but not "Y":
outer
inner
A
B
- test case
0 passing (11ms)
1 pending
In general,
- If I call
skip(), then I would not expect that innerbeforeEachblocks would be executed. - If a
beforeEachblock is executed, then the correspondingafterEachblocks should also be executed, for symmetry.
nullin, andsouto and HarshaNalluru
Metadata
Metadata
Assignees
Labels
type: buga defect, confirmed by a maintainera defect, confirmed by a maintainer