run single test case, test file or a subset of test cases in mochajs
Run a single test case
describe('Foo', () => {
describe('#Bar()', () => {
it.only('should execute me', () => {
...
});
it('should not execute me', () => {
...
});
});
});
Run a single test suite
describe('Foo', () => {
describe.only('#Bar()', () => {
...
});
});
Run a subset of suites
describe('FOO', () => {
describe.only('#Bar1()', () => {
it('should execute', () => {
...
});
it('should execute', () => {
...
});
});
describe.only('#Bar2()', () => {
it('should execute 1', () => {
...
});
});
describe('#Bar3()', () => {
it('should NOT execute', () => {
...
});
});
});
- Search for Only API