test: 引入 Vitest 测试骨架并抽出颜色/比例纯函数模块

This commit is contained in:
2026-06-15 13:39:02 +08:00
parent 307537a7ce
commit 45e6534ee1
12 changed files with 3773 additions and 199 deletions
+10 -4
View File
@@ -7,20 +7,26 @@
"dev": "vite --host 127.0.0.1",
"build": "vite build",
"preview": "vite preview --host 127.0.0.1",
"type-check": "tsc -p tsconfig.json --noEmit"
"type-check": "tsc -p tsconfig.json --noEmit",
"test": "vitest",
"test:run": "vitest run",
"test:coverage": "vitest run --coverage"
},
"dependencies": {
"@ant-design/icons": "5.3.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"scheduler": "0.23.0",
"zustand": "5.0.13"
},
"devDependencies": {
"@types/react": "18.2.0",
"@types/react-dom": "18.2.0",
"@types/react": "18.2.55",
"@types/react-dom": "18.2.18",
"@vitejs/plugin-react": "4.2.1",
"@vitest/coverage-v8": "^1.6.0",
"typescript": "5.3.3",
"vite": "5.1.0",
"vite-plugin-compression2": "2.5.3"
"vite-plugin-compression2": "2.5.3",
"vitest": "^1.6.0"
}
}