chore(test): add vitest setup
Wires up vitest + @vue/test-utils + jsdom so the spec 0004 tests can run.
- package.json: 3 npm scripts (test, test:run, test:ui) + vitest /
@vue/test-utils / jsdom devDeps.
- vitest.config.js: jsdom env, @ alias pointing at src/, setup file.
- src/test-setup.js: shared jest-dom-style matchers.
- src/__tests__/smoke.test.js: sanity check the harness resolves the @
alias and that taskService imports cleanly.
Co-Authored-By:
Claude <noreply@anthropic.com>
This diff is collapsed.
| ... | @@ -11,7 +11,10 @@ | ... | @@ -11,7 +11,10 @@ |
| "build": "vite build", | "build": "vite build", | ||
| "preview": "vite preview", | "preview": "vite preview", | ||
| "lint": "eslint . --fix", | "lint": "eslint . --fix", | ||
| "format": "prettier --write src/" | "format": "prettier --write src/", | ||
| "test": "vitest", | |||
| "test:run": "vitest run", | |||
| "test:ui": "vitest --ui" | |||
| }, | }, | ||
| "dependencies": { | "dependencies": { | ||
| "@fullcalendar/daygrid": "^6.1.21", | "@fullcalendar/daygrid": "^6.1.21", | ||
| ... | @@ -29,12 +32,15 @@ | ... | @@ -29,12 +32,15 @@ |
| "@eslint/js": "^9.31.0", | "@eslint/js": "^9.31.0", | ||
| "@vitejs/plugin-vue": "^6.0.1", | "@vitejs/plugin-vue": "^6.0.1", | ||
| "@vue/eslint-config-prettier": "^10.2.0", | "@vue/eslint-config-prettier": "^10.2.0", | ||
| "@vue/test-utils": "^2.4.11", | |||
| "eslint": "^9.31.0", | "eslint": "^9.31.0", | ||
| "eslint-plugin-vue": "~10.3.0", | "eslint-plugin-vue": "~10.3.0", | ||
| "globals": "^16.3.0", | "globals": "^16.3.0", | ||
| "js-yaml": "^5.2.0", | "js-yaml": "^5.2.0", | ||
| "jsdom": "^29.1.1", | |||
| "prettier": "3.6.2", | "prettier": "3.6.2", | ||
| "vite": "^7.0.6", | "vite": "^7.0.6", | ||
| "vite-plugin-vue-devtools": "^8.0.0" | "vite-plugin-vue-devtools": "^8.0.0", | ||
| "vitest": "^4.1.10" | |||
| } | } | ||
| } | } |
src/__tests__/smoke.test.js
0 → 100644
src/test-setup.js
0 → 100644
vitest.config.js
0 → 100644
Please register or sign in to comment