1.0.8 • Published 3 years ago

jest-tags v1.0.8

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

jest-tags

npm i jest-tags --save-dev
npm i -g jest-tags

AND, NOT, OR

AND

Run tests with the X and Y tags

jest-tags --tags 'X && Y'

OR

Run tests with the X or Y tags

jest-tags --tags 'X Y'

or

jest-tags --tags 'X || Y'

AND

Don't run tests with the X tag

jest-tags --tags '!X'

Combined

Don't run tests with the X and Y tags combination

jest-tags --tags '!X && !Y'

Run tests without the X or Y tags

jest-tags --tags '!X || !Y'

Run tests with the X tag and without the Y tag

jest-tags --tags 'X && !Y'

Example

const {tags} = require('jest-tags')

tags('smoke').test(/* ... */)

tags('integration', 'fast').it(/* ... */)
jest-tags --tags "smoke !integration"

Only tests that matches the criteria will proceed. Other tests will be skipped and appear as skipped in the test output.

Test hooks

  • tags().test.only() : has a priority over a tag
  • tags().test.skip() : has a priority over a tag
1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago