Skip to content

Commit 9fce90b

Browse files
KJ7LNWEric Wheeler
andauthored
fix: add run parameter to vitest command in rules (#5991)
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 <[email protected]> Co-authored-by: Eric Wheeler <[email protected]>
1 parent cfda839 commit 9fce90b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.roo/rules/rules.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
- Ensure all tests pass before submitting changes
77
- 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
88
- Tests must be run from the same directory as the `package.json` file that specifies `vitest` in `devDependencies`
9-
- Run tests with: `npx vitest <relative-path-from-workspace-root>`
9+
- Run tests with: `npx vitest run <relative-path-from-workspace-root>`
1010
- Do NOT run tests from project root - this causes "vitest: command not found" error
1111
- Tests must be run from inside the correct workspace:
12-
- Backend tests: `cd src && npx vitest path/to/test-file` (don't include `src/` in path)
13-
- UI tests: `cd webview-ui && npx vitest src/path/to/test-file`
14-
- Example: For `src/tests/user.test.ts`, run `cd src && npx vitest tests/user.test.ts` NOT `npx vitest src/tests/user.test.ts`
12+
- Backend tests: `cd src && npx vitest run path/to/test-file` (don't include `src/` in path)
13+
- UI tests: `cd webview-ui && npx vitest run src/path/to/test-file`
14+
- 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`
1515

1616
2. Lint Rules:
1717

0 commit comments

Comments
 (0)