Skip to content

Commit 88421c9

Browse files
committed
update(vitest cookbook): add "Run a subset of tests"
1 parent a6481fa commit 88421c9

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

docusaurus/docs/vitest/cookbook.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
pagination_next: null
3+
pagination_prev: null
4+
---
5+
6+
# Vitest Cookbook
7+
8+
## Run a subset of tests
9+
10+
To run a subset of your test suite you have a couple of options:
11+
12+
- `KNAPSACK_PRO_TEST_FILE_*` environment variables:
13+
- [`KNAPSACK_PRO_TEST_FILE_PATTERN`](reference.md#knapsack_pro_test_file_pattern)
14+
- [`KNAPSACK_PRO_TEST_FILE_EXCLUDE_PATTERN`](reference.md#knapsack_pro_test_file_exclude_pattern)
15+
- [`KNAPSACK_PRO_TEST_FILE_LIST_SOURCE_FILE`](reference.md#knapsack_pro_test_file_list_source_file)

docusaurus/sidebars.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,11 @@ const sidebars: SidebarsConfig = {
244244
label: "Troubleshooting",
245245
id: "vitest/troubleshooting",
246246
},
247+
{
248+
type: "doc",
249+
label: "Cookbook",
250+
id: "vitest/cookbook",
251+
},
247252
{
248253
type: "link",
249254
label: "GitHub",

0 commit comments

Comments
 (0)