snippetbashTip
jest — A zero-configuration JavaScript testing platform. More information: <https://jestjs.io/docs/cli>.
Viewed 0 times
configurationcommandtestingjestjavascriptcliplatformzero
Problem
How to use the
jest command: A zero-configuration JavaScript testing platform. More information: <https://jestjs.io/docs/cli>.Solution
jest — A zero-configuration JavaScript testing platform. More information: <https://jestjs.io/docs/cli>.Run all available tests:
jestRun the test suites from the given files:
jest {{path/to/file1 path/to/file2 ...}}Run the test suites from files within the current and subdirectories, whose paths match the given
regex:jest {{regex1 regex2 ...}}Run the tests whose names match the given
regex:jest --testNamePattern {{regex}}Run test suites related to a given source file:
jest --findRelatedTests {{path/to/source_file.js}}Run test suites related to all uncommitted files:
jest --onlyChangedWatch files for changes and automatically re-run related tests:
jest --watchDisplay help:
jest --helpCode Snippets
Run all available tests
jestRun the test suites from the given files
jest {{path/to/file1 path/to/file2 ...}}Run the test suites from files within the current and subdirectories, whose paths match the given `regex`
jest {{regex1 regex2 ...}}Run the tests whose names match the given `regex`
jest --testNamePattern {{regex}}Run test suites related to a given source file
jest --findRelatedTests {{path/to/source_file.js}}Context
tldr-pages: common/jest
Revisions (0)
No revisions yet.