mirror of https://github.com/CrimsonTome/tldr.git
jest: improve page and add new example (#3527)
- Tweak descriptions for extra clarity - Adjust tokens in second example to illustrate the available syntax - Add example for --findRelatedTestsitalian
parent
8a8646884c
commit
dfed39c22c
|
@ -3,23 +3,27 @@
|
||||||
> A zero-configuration JavaScript testing platform.
|
> A zero-configuration JavaScript testing platform.
|
||||||
> More information: <https://jestjs.io>.
|
> More information: <https://jestjs.io>.
|
||||||
|
|
||||||
- Run all tests:
|
- Run all available tests:
|
||||||
|
|
||||||
`jest`
|
`jest`
|
||||||
|
|
||||||
- Run tests from the test files that match the regex patterns:
|
- Run the test suites from files whose paths match the given regex patterns:
|
||||||
|
|
||||||
`jest {{test_file1}} {{test_file2}}`
|
`jest {{test_file1}} {{path/to/test_file2.js}}`
|
||||||
|
|
||||||
- Run tests whose names match the regex pattern:
|
- Run the tests whose names match the given regex pattern:
|
||||||
|
|
||||||
`jest --testNamePattern {{spec_name}}`
|
`jest --testNamePattern {{spec_name}}`
|
||||||
|
|
||||||
- Run tests related to uncommitted files:
|
- 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 --onlyChanged`
|
`jest --onlyChanged`
|
||||||
|
|
||||||
- Watch files for changes and re-run related tests:
|
- Watch files for changes and automatically re-run related tests:
|
||||||
|
|
||||||
`jest --watch`
|
`jest --watch`
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue