[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
12

Configure Feed

Select the types of activity you want to include in your feed.

chore: warn agents not to use `pnpm test` with double hyphens `--` (#9805)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

authored by

Hiroshi Ogawa
Claude Opus 4.6
and committed by
GitHub
(Mar 6, 2026, 8:40 PM +0100) 03759321 d93a1c0b

+11
+11
AGENTS.md
··· 35 35 - **Core directory test**: `CI=true pnpm test <test-file>` (for `test/core`) 36 36 - **Browser tests**: `CI=true pnpm test:browser:playwright` or `CI=true pnpm test:browser:webdriverio` 37 37 38 + **IMPORTANT: Do NOT use `--` when passing test filters to pnpm.** 39 + Using `--` causes pnpm to drop the filter, resulting in a full test run instead of a filtered one. 40 + 41 + ```bash 42 + # WRONG - runs ALL tests (filter is ignored): 43 + pnpm test -- basic.test.ts -t 'expect' 44 + 45 + # CORRECT - runs only matching tests: 46 + pnpm test basic.test.ts -t 'expect' 47 + ``` 48 + 38 49 When writing tests, AVOID using `toContain` for validation. Prefer using `toMatchInlineSnapshot` to include the test error and its stack. If snapshot is failing, update the snapshot instead of reverting it to `toContain`. 39 50 40 51 If you need to typecheck tests, run `pnpm typecheck` from the root of the workspace.