npm i jest-tags --save-dev
npm i -g jest-tagsRun tests with the X and Y tags
jest-tags --tags 'X && Y'Run tests with the X or Y tags
jest-tags --tags 'X Y'or
jest-tags --tags 'X || Y'Don't run tests with the X tag
jest-tags --tags '!X'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'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.
tags().test.only(): has a priority over a tagtags().test.skip(): has a priority over a tag