mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-03 21:15:32 +02:00
vitest: add page (#15145)
* vitest: add page * vitest: fix message to follow style guide Co-authored-by: Wiktor Perskawiec <git@spageektti.cc> --------- Co-authored-by: Wiktor Perskawiec <git@spageektti.cc>
This commit is contained in:
parent
9e0bfa2906
commit
6159d55166
1 changed files with 36 additions and 0 deletions
36
pages/common/vitest.md
Normal file
36
pages/common/vitest.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
# vitest
|
||||
|
||||
> Fast, modern testing framework built for Vite, offering seamless integration, TypeScript support, and a Jest-compatible API for unit, integration, and snapshot testing.
|
||||
> More information: <https://vitest.dev/guide>.
|
||||
|
||||
- Run all available tests:
|
||||
|
||||
`vitest run`
|
||||
|
||||
- Run the test suites from the given files:
|
||||
|
||||
`vitest run {{path/to/file1 path/to/file2 ...}}`
|
||||
|
||||
- Run the test suites from files within the current and subdirectories, whose paths match the given regular expression:
|
||||
|
||||
`vitest run {{regular_expression1}} {{regular_expression2}}`
|
||||
|
||||
- Run the tests whose names match the given regular expression:
|
||||
|
||||
`vitest run --testNamePattern {{regular_expression}}`
|
||||
|
||||
- Watch files for changes and automatically re-run related tests:
|
||||
|
||||
`vitest`
|
||||
|
||||
- Run tests with coverage:
|
||||
|
||||
`vitest run --coverage`
|
||||
|
||||
- Run all tests but stops immediately after the first test failure:
|
||||
|
||||
`vitest run --bail=1`
|
||||
|
||||
- Display help:
|
||||
|
||||
`vitest --help`
|
Loading…
Add table
Reference in a new issue