Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

docs: Update test running instructions (#13902)

Ben Bachema8f5f17585be
diff --git a/.agents/skills/backend-dev-guidelines/references/testing-guide.md b/.agents/skills/backend-dev-guidelines/references/testing-guide.md
index 2e89b86c6e..3802ddde54 100644
--- a/.agents/skills/backend-dev-guidelines/references/testing-guide.md
+++ b/.agents/skills/backend-dev-guidelines/references/testing-guide.md
@@ -510,8 +510,8 @@ Use the nearest package `AGENTS.md` as the source of truth for current test
commands.
Common targeted forms:
-- Web server tests: `pnpm --filter web run test -- <pattern>`
-- Web client tests: `pnpm --filter web run test-client -- <pattern>`
+- Web server tests: `pnpm --filter web run test <file-or-pattern>`
+- Web client tests: `pnpm --filter web run test-client <file-or-pattern>`
- Worker tests: `pnpm --filter worker run test <file-or-pattern>`
---
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index fd3f4f50a1..3a4fe859d1 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -324,8 +324,8 @@ We're using Vitest in the `web` package. There are two types of unit tests:
To run a specific test by name within a file, run:
```sh
-cd web # or with --filter=web
-pnpm test -- prompts.v2.servertest -t "should handle special characters in prompt names"
+cd web # or use `pnpm --filter web test ...` from the repository root
+pnpm test prompts.v2.servertest -t "should handle special characters in prompt names"
```
To run all tests:
@@ -345,7 +345,7 @@ pnpm run test:watch
For the `worker` package, we're also using Vitest to run unit tests.
```sh
-pnpm run test --filter=worker -- FILE_YOU_WANT_TO_TEST.ts -t "test name"
+pnpm --filter worker run test FILE_YOU_WANT_TO_TEST.ts -t "test name"
```
## CI/CD
diff --git a/web/AGENTS.md b/web/AGENTS.md
index c7f37e8ae1..f3f233ca43 100644
--- a/web/AGENTS.md
+++ b/web/AGENTS.md
@@ -132,9 +132,9 @@ signoff of user-visible changes.
- Lint: `pnpm --filter web run lint`
- Lint fix: `pnpm --filter web run lint:fix`
- Typecheck: `pnpm --filter web run typecheck`
-- Server tests: `pnpm --filter web run test -- <args>`
-- In-source tests: `pnpm --filter web run test:in-source -- <args>`
-- Client tests: `pnpm --filter web run test-client -- <args>`
+- Server tests: `pnpm --filter web run test <args>`
+- In-source tests: `pnpm --filter web run test:in-source <args>`
+- Client tests: `pnpm --filter web run test-client <args>`
- E2E tests: `pnpm --filter web run test:e2e`
- Agent browser install to the default user-level Playwright cache: `pnpm run playwright:install`
- Build: `pnpm --filter web run build`
diff --git a/web/src/components/trace/components/_shared/tree-flattening.clienttest.ts b/web/src/components/trace/components/_shared/tree-flattening.clienttest.ts
index 61aa7f3caa..299391e95e 100644
--- a/web/src/components/trace/components/_shared/tree-flattening.clienttest.ts
+++ b/web/src/components/trace/components/_shared/tree-flattening.clienttest.ts
@@ -4,7 +4,7 @@
* Tests the flattenTree function which converts hierarchical tree structures
* into flat lists for virtualized rendering.
*
- * Run with: pnpm test-client --testPathPattern="tree-flattening"
+ * Run with: pnpm test-client "tree-flattening"
*/
import { flattenTree } from "./tree-flattening";
diff --git a/web/src/components/trace/contexts/json-expansion-utils.clienttest.ts b/web/src/components/trace/contexts/json-expansion-utils.clienttest.ts
index 912e916f5e..52a74a02e7 100644
--- a/web/src/components/trace/contexts/json-expansion-utils.clienttest.ts
+++ b/web/src/components/trace/contexts/json-expansion-utils.clienttest.ts
@@ -4,7 +4,7 @@
* These functions handle translation between actual observation keys and
* normalized keys for persistent storage across different traces.
*
- * Run with: pnpm test-client --testPathPattern="json-expansion-utils"
+ * Run with: pnpm test-client "json-expansion-utils"
*/
import {
diff --git a/web/src/components/trace/lib/tree-building.clienttest.ts b/web/src/components/trace/lib/tree-building.clienttest.ts
index c535ca2744..a978cb5846 100644
--- a/web/src/components/trace/lib/tree-building.clienttest.ts
+++ b/web/src/components/trace/lib/tree-building.clienttest.ts
@@ -1,7 +1,7 @@
/**
* Tests for tree-building utilities.
*
- * Run with: pnpm test-client --testPathPattern="tree-building"
+ * Run with: pnpm test-client "tree-building"
*/
import {
diff --git a/web/src/components/ui/AdvancedJsonViewer/README.md b/web/src/components/ui/AdvancedJsonViewer/README.md
index 921c773b0a..9b0853c09e 100644
--- a/web/src/components/ui/AdvancedJsonViewer/README.md
+++ b/web/src/components/ui/AdvancedJsonViewer/README.md
@@ -259,7 +259,7 @@ AdvancedJsonViewer/
Tests use `.clienttest.ts` extension and are colocated with utils:
```bash
-pnpm --filter=web run test-client --testPathPattern="AdvancedJsonViewer"
+pnpm --filter=web run test-client "AdvancedJsonViewer"
```
Key test files:
diff --git a/web/src/features/score-analytics/README.md b/web/src/features/score-analytics/README.md
index 8870ad9c60..0da79f3320 100644
--- a/web/src/features/score-analytics/README.md
+++ b/web/src/features/score-analytics/README.md
@@ -397,7 +397,7 @@ Test coverage:
Run tests:
```bash
-pnpm --filter=web test -- --testPathPattern="score-comparison-analytics"
+pnpm --filter=web test "score-comparison-analytics"
```
## Troubleshooting