feat: add Vitest unit testing infrastructure with initial test suite.

This commit is contained in:
Xiaohan-Tian
2025-09-03 22:15:05 -07:00
parent be39392aee
commit aa2b19966b
11 changed files with 2673 additions and 13 deletions
+15 -4
View File
@@ -7,7 +7,11 @@
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"preview": "vite preview"
"preview": "vite preview",
"test": "vitest",
"test:ui": "vitest --ui",
"test:coverage": "vitest --coverage",
"test:run": "vitest run"
},
"dependencies": {
"class-transformer": "^0.5.1",
@@ -24,20 +28,27 @@
},
"devDependencies": {
"@eslint/js": "^9.29.0",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@testing-library/jest-dom": "^6.8.0",
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1",
"@types/node": "^22.9.3",
"@types/react": "^19.1.8",
"@types/react-dom": "^19.1.6",
"@types/react-syntax-highlighter": "^15.5.13",
"@vitejs/plugin-react": "^4.5.2",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@vitest/coverage-v8": "^3.2.4",
"@vitest/ui": "^3.2.4",
"eslint": "^9.29.0",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.20",
"globals": "^16.2.0",
"jsdom": "^26.1.0",
"semantic-release": "^21.1.2",
"typescript": "~5.8.3",
"typescript-eslint": "^8.34.1",
"vite": "^7.0.0"
"vite": "^7.0.0",
"vitest": "^3.2.4"
}
}