LinuxCommandLibrary

jest

jest

TLDR

Run all available tests

$ jest
copy


Run the test suites from the given files
$ jest [path/to/file1] [path/to/file2]
copy


Run the test suites from files within the current and subdirectories, whose paths match the given regular expression
$ jest [regular_expression1] [regular_expression2]
copy


Run the tests whose names match the given regular expression
$ jest --testNamePattern [regular_expression]
copy


Run test suites related to a given source file
$ jest --findRelatedTests [path/to/source_file.js]
copy


Run test suites related to all uncommitted files
$ jest --onlyChanged
copy


Watch files for changes and automatically re-run related tests
$ jest --watch
copy


Show help
$ jest --help
copy

Copied to clipboard