I have some unit test that should not be run, as of now, is there a way I can skip them? Other than using fdescribe on the ones I want to run.
Asked
Active
Viewed 2.3k times
2 Answers
38
If you're looking to skip tests, it's 'x' in front of describe() or it():
xdescribe('some test', () => { });
And maybe just skip a test in a block:
describe('some other test', () => {
xit('skip this test', () => { });
});

rrd
- 5,789
- 3
- 28
- 36
0
If you want to skip the entire test suite during run time based on some condition, you can do something like:
(yourCondition ? xdescribe : describe)('My Test Suite', function () {
...
})

Rajat Saxena
- 3,834
- 5
- 45
- 63