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

This commit is contained in:
Eunjae Lee
2025-12-12 11:48:30 +00:00
committed by GitHub
parent b4e773da69
commit 728e1173cb
2 changed files with 17 additions and 2 deletions
+9
View File
@@ -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)
+8 -2
View File
@@ -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)