NEVER use npx to run tests. ALWAYS use pnpm.
# ❌ WRONG
npx vitest run yjs.integ
# ✅ CORRECT
pnpm vitest run yjs.integ
# Use partial file name - Vitest auto-matches
pnpm vitest run yjs.integ
pnpm vitest run helper.spec
pnpm vitest run Button.spec
# Flaky test detection
pnpm vitest run yjs.integ --repeat=10
src/ prefix or full path needed)--project flag needed (Vitest auto-detects from file extension)turbo run test --filter @growi/app
For testing patterns (mocking, assertions, structure), see the .claude/skills/learned/essential-test-patterns skill.