Skip to content

Scheduling infrastructure for absolutely everyone.

chore: update AGENTS.md on running unit tests for specific test name (#25820)

Eunjae Lee728e1173cb0d
diff --git a/AGENTS.md b/AGENTS.md
index 13cb5ac8708..57d718f7dbd 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -45,11 +45,20 @@ yarn prettier --write path/to/file.tsx
# Unit test specific file
yarn vitest run path/to/file.test.ts
+# Unit test specific file + specific test
+yarn vitest run path/to/file.test.ts --testNamePattern="specific test name"
+
# Integration test specific file
yarn test path/to/file.integration-test.ts -- --integrationTestsOnly
+# Integration test specific file + specific test
+yarn test path/to/file.integration-test.ts --testNamePattern="specific test name" -- --integrationTestsOnly
+
# E2E test specific file
PLAYWRIGHT_HEADLESS=1 yarn e2e path/to/file.e2e.ts
+
+# E2E test specific file + specific test
+PLAYWRIGHT_HEADLESS=1 yarn e2e path/to/file.e2e.ts --grep "specific test name"
```
### Project-wide (use sparingly)
diff --git a/agents/commands.md b/agents/commands.md
index dcd7bed7f2a..ec193cf8d7e 100644
--- a/agents/commands.md
+++ b/agents/commands.md
@@ -28,11 +28,17 @@
- `yarn test` - Run unit tests (vitest)
- `yarn test <filename>` - Run tests for specific file
-- `yarn test <filename> -- --integrationTestsOnly` - Run integration tests for specific file
-- `yarn test <filename> -t "<testName>" -- --integrationTestsOnly` - Run specific test by name
+- `yarn test <filename> -t "<testName>"` - Run specific test by name for specific file
- `yarn tdd` - Run tests in watch mode
- `yarn test:ui` - Run tests with UI interface
+### Integration Tests
+
+- `yarn test -- --integrationTestsOnly` - Run integration tests (vitest)
+- `yarn test <filename> -- --integrationTestsOnly` - Run integration tests for specific file
+- `yarn test <filename> -t "<testName>" -- --integrationTestsOnly` - Run specific integration test by name for specific file
+
+
### End-to-End Tests
- `yarn e2e` - Run end-to-end tests (Playwright)