1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 19:22:08 +02:00
tldr/pages/common/jest.md
Waldir Pimenta dfed39c22c 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 --findRelatedTests
2019-11-05 09:41:20 +08:00

32 lines
656 B
Markdown

# jest
> A zero-configuration JavaScript testing platform.
> More information: <https://jestjs.io>.
- Run all available tests:
`jest`
- Run the test suites from files whose paths match the given regex patterns:
`jest {{test_file1}} {{path/to/test_file2.js}}`
- Run the tests whose names match the given regex pattern:
`jest --testNamePattern {{spec_name}}`
- 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`
- Watch files for changes and automatically re-run related tests:
`jest --watch`
- Show help:
`jest --help`