From f77f9e31ebc5239aecc48a47e50131037412857d Mon Sep 17 00:00:00 2001 From: Eric Wheeler Date: Sun, 20 Jul 2025 17:48:51 -0700 Subject: [PATCH] fix: add run parameter to vitest command in rules When running vitest without the run parameter, it enters watch mode and waits for user input (like pressing q to quit), causing tests to hang in the terminal. This change updates the documentation to specify using npx vitest run instead of just npx vitest to ensure tests run to completion without requiring user interaction. Signed-off-by: Eric Wheeler --- .roo/rules/rules.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.roo/rules/rules.md b/.roo/rules/rules.md index aad45c9bc64..2323f033543 100644 --- a/.roo/rules/rules.md +++ b/.roo/rules/rules.md @@ -6,12 +6,12 @@ - Ensure all tests pass before submitting changes - The vitest framework is used for testing; the `describe`, `test`, `it`, etc functions are defined by default in `tsconfig.json` and therefore don't need to be imported - Tests must be run from the same directory as the `package.json` file that specifies `vitest` in `devDependencies` - - Run tests with: `npx vitest ` + - Run tests with: `npx vitest run ` - Do NOT run tests from project root - this causes "vitest: command not found" error - Tests must be run from inside the correct workspace: - - Backend tests: `cd src && npx vitest path/to/test-file` (don't include `src/` in path) - - UI tests: `cd webview-ui && npx vitest src/path/to/test-file` - - Example: For `src/tests/user.test.ts`, run `cd src && npx vitest tests/user.test.ts` NOT `npx vitest src/tests/user.test.ts` + - Backend tests: `cd src && npx vitest run path/to/test-file` (don't include `src/` in path) + - UI tests: `cd webview-ui && npx vitest run src/path/to/test-file` + - Example: For `src/tests/user.test.ts`, run `cd src && npx vitest run tests/user.test.ts` NOT `npx vitest run src/tests/user.test.ts` 2. Lint Rules: