Skip to content

Commit a1dbb8d

Browse files
jdaltonclaude
andcommitted
Fix vitest command execution in test scripts
Change test:unit scripts to use `pnpm vitest` instead of `vitest` to ensure vitest is properly resolved from pnpm's dependency tree. The `vitest` command alone was failing with "Command not found" error when executed through dotenvx, even though vitest is in devDependencies. Using `pnpm vitest` ensures the command runs through pnpm's shim system. - Update test:unit to use `pnpm vitest run` - Update test:unit:update to use `pnpm vitest run --update` - Update test:unit:coverage to use `pnpm vitest run --coverage` This allows test scripts to run successfully via `pnpm test` command. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 3e1ed58 commit a1dbb8d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@
7575
"bs": "pnpm run build:dist:src; pnpm exec socket --",
7676
"s": "pnpm exec socket --",
7777
"test": "run-s check test:*",
78-
"test:unit": "dotenvx -q run -f .env.test -- vitest run --config .config/vitest.config.mts",
79-
"test:unit:update": "dotenvx -q run -f .env.test -- vitest run --config .config/vitest.config.mts --update",
80-
"test:unit:coverage": "dotenvx -q run -f .env.test -- vitest run --config .config/vitest.config.mts --coverage",
78+
"test:unit": "dotenvx -q run -f .env.test -- pnpm vitest run --config .config/vitest.config.mts",
79+
"test:unit:update": "dotenvx -q run -f .env.test -- pnpm vitest run --config .config/vitest.config.mts --update",
80+
"test:unit:coverage": "dotenvx -q run -f .env.test -- pnpm vitest run --config .config/vitest.config.mts --coverage",
8181
"test:validate": "node scripts/validate-tests.mjs",
8282
"test:wrapper": "node scripts/test-wrapper.mjs",
8383
"test-ci": "run-s test:*",

0 commit comments

Comments
 (0)