diff --git a/AGENTS.md b/AGENTS.md index 13cb5ac870..57d718f7db 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 dcd7bed7f2..ec193cf8d7 100644 --- a/agents/commands.md +++ b/agents/commands.md @@ -28,11 +28,17 @@ - `yarn test` - Run unit tests (vitest) - `yarn test ` - Run tests for specific file -- `yarn test -- --integrationTestsOnly` - Run integration tests for specific file -- `yarn test -t "" -- --integrationTestsOnly` - Run specific test by name +- `yarn test -t ""` - 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 -- --integrationTestsOnly` - Run integration tests for specific file +- `yarn test -t "" -- --integrationTestsOnly` - Run specific integration test by name for specific file + + ### End-to-End Tests - `yarn e2e` - Run end-to-end tests (Playwright)