mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-04-16 23:38:52 +00:00
Merge pull request #1284 from balena-io/run-specific-test-docs
Added explanation README for running specific tests
This commit is contained in:
commit
f7783747ac
15
README.md
15
README.md
@ -238,6 +238,21 @@ production.
|
||||
Alternatively, tests will be run when building the image,
|
||||
which ensures that the environment is exactly the same.
|
||||
|
||||
#### Running specific tests quickly
|
||||
|
||||
You can run specific tests quickly with the `test:fast` script by matching with test suites (describe) or test cases (it) using a string or regexp:
|
||||
|
||||
```sh
|
||||
npm run test:fast -- --grep spawnJournalctl
|
||||
|
||||
npm run test:fast -- --grep "detect a V2 delta"
|
||||
|
||||
npm run test:fast -- --grep (GET|POST|PUT|DELETE)
|
||||
```
|
||||
|
||||
The --grep option, when specified, will trigger mocha to only run tests matching the given pattern which is internally compiled to a RegExp.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
Copyright 2020 Balena Ltd.
|
||||
|
Loading…
x
Reference in New Issue
Block a user