Skip to content

Execute a subset of tests

Arnaud Peloquin edited this page May 4, 2017 · 2 revisions

First please note that all jasmine suites (describe()) have to be wrapped in a main() function in .spec.ts files.

Run a subset of describe (suites)

Prepend an 'f' to each of the describe() you wish to include. All other elements not starting with 'f' will henceforth be ignored when running npm test:

export function main() {
  fdescribe('my suite', () => {
    beforeEach(() => {...});
    it('my spec', () => {...});
  });
}

Run a subset of it (specs)

Prepend an 'f' to each of the it() you wish to include. All other elements not starting with 'f' will henceforth be ignored when running npm test:

export function main() {
  describe('my suite', () => {
    beforeEach(() => {...});
    fit('my spec', () => {...});
  });
}
Clone this wiki locally