Prerequisites
Description
I ran into something weird while using describe.skip. If I have nested describes, with at least 2 skipped describes inside one, all other describes will be tagged pending.
Steps to Reproduce
First file names 10.test.js:
var assert = require('assert');
describe("Some tests", function(){
describe("First describe", function(){
it("should pass", function(){
assert.equal(1,1)
})
})
describe.skip("Some disabled test");
describe.skip("Another disabled test");
describe.skip("One more disabled test");
})
Second file named 20.test.js
var assert = require('assert');
describe("Some other tests", function(){
describe("a new describe", function(){
it("should still pass", function(){
assert.equal(1,1)
})
})
})
Results in:
Some tests
First describe
✓ should pass
Some disabled test
Another disabled test
Some other tests
a new describe
- should still pass
1 passing (5ms)
1 pending
Note that it is possible to do this with only one file as well:
test.js:
var assert = require('assert');
describe("Some tests", function(){
describe.skip("Some disabled test");
describe.skip("Another disabled test");
describe("First describe", function(){
it("should pass", function(){
assert.equal(1,1)
})
})
})
Results in:
Some disabled test
Another disabled test
First describe
- should pass
0 passing (4ms)
1 pending
Expected behavior: Only the skipped describes should be marked pending
Actual behavior: All describes after the first two skipped ones will be marked pending.
Reproduces how often: 100%
Versions
- mocha version: 4.0.1
- node version: 9.3.0
- Arch linux
- zsh
Prerequisites
common mistakelabelnode node_modules/.bin/mocha --version(Local) andmocha --version(Global). We recommend avoiding the use of globally installed Mocha.Description
I ran into something weird while using
describe.skip. If I have nested describes, with at least 2 skipped describes inside one, all other describes will be tagged pending.Steps to Reproduce
First file names 10.test.js:
Second file named 20.test.js
Results in:
Note that it is possible to do this with only one file as well:
test.js:
Results in:
Expected behavior: Only the skipped describes should be marked pending
Actual behavior: All describes after the first two skipped ones will be marked pending.
Reproduces how often: 100%
Versions