chore(01-01): configure Vitest test infrastructure

- Add vitest.config.js with jsdom environment and global test APIs
- Install vitest and jsdom as dev dependencies
- Add test scripts (test, test:run) to package.json

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-12 02:39:49 +00:00
parent cf021465ba
commit e4ed7a6592
3 changed files with 2132 additions and 0 deletions
+2103
View File
File diff suppressed because it is too large Load Diff
+20
View File
@@ -0,0 +1,20 @@
{
"name": "expense-splitter",
"version": "1.0.0",
"description": "A web app for splitting restaurant bills fairly among friends",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"test": "vitest",
"test:run": "vitest run"
},
"devDependencies": {
"jsdom": "^28.1.0",
"vitest": "^4.0.18"
},
"dependencies": {
"@preact/signals": "^2.8.2"
}
}
+9
View File
@@ -0,0 +1,9 @@
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
environment: 'jsdom',
globals: true,
include: ['tests/**/*.test.js'],
},
});