- 添加 vitest 测试框架配置 - 添加 src/api/__tests__/api.test.ts: 16个 API 测试 - 修复 points.ts 和 ledger.ts 导入问题 测试覆盖: - AccountAPI: 物理账户和子账户方法 - TransactionAPI: transfer/deposit/withdraw - LedgerAPI: subjects/entry/accountEntries - ReconciliationAPI: 8个端点方法 - PointsAPI: 5个端点方法 - 类型定义和导出测试
41 lines
1.0 KiB
JSON
41 lines
1.0 KiB
JSON
{
|
|
"name": "rustjr-vue-frontend",
|
|
"version": "1.0.0",
|
|
"description": "账户管理系统Vue前端",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"dev:mock": "VITE_USE_MOCK=true vite",
|
|
"build": "vue-tsc && vite build",
|
|
"preview": "vite preview",
|
|
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"test:coverage": "vitest run --coverage"
|
|
},
|
|
"dependencies": {
|
|
"vue": "^3.4.21",
|
|
"vue-router": "^4.3.0",
|
|
"pinia": "^2.1.7",
|
|
"element-plus": "^2.6.1",
|
|
"@element-plus/icons-vue": "^2.3.1",
|
|
"axios": "^1.6.7",
|
|
"dayjs": "^1.11.10"
|
|
},
|
|
"devDependencies": {
|
|
"@vitejs/plugin-vue": "^5.0.4",
|
|
"typescript": "^5.3.3",
|
|
"vite": "^5.1.4",
|
|
"vue-tsc": "^2.0.6",
|
|
"msw": "^2.2.1",
|
|
"@types/node": "^20.11.19",
|
|
"vitest": "^1.3.1",
|
|
"@vitest/coverage-v8": "^1.3.1",
|
|
"happy-dom": "^13.6.2"
|
|
},
|
|
"msw": {
|
|
"workerDirectory": [
|
|
"public"
|
|
]
|
|
}
|
|
} |