后端迁移测试文件

This commit is contained in:
yml
2026-05-21 17:39:34 +08:00
parent 3a2f89e233
commit acd5c0d50e
37 changed files with 12 additions and 2 deletions
+1 -1
View File
@@ -12,7 +12,7 @@
"build": "tsc -p tsconfig.build.json && rm -rf dist/db/migrations && mkdir -p dist/db && cp -R src/db/migrations dist/db/migrations", "build": "tsc -p tsconfig.build.json && rm -rf dist/db/migrations && mkdir -p dist/db && cp -R src/db/migrations dist/db/migrations",
"db:migrate": "tsx src/db/migrate.ts", "db:migrate": "tsx src/db/migrate.ts",
"dev": "tsx watch --clear-screen=false --include config src/index.ts", "dev": "tsx watch --clear-screen=false --include config src/index.ts",
"test": "node --import tsx --test $(find src -name '*.test.js' -print)", "test": "node --import tsx --test $(find src \\( -name '*.test.ts' -o -name '*.test.js' \\) -print)",
"typecheck": "tsc -p tsconfig.json --noEmit", "typecheck": "tsc -p tsconfig.json --noEmit",
"start": "node dist/index.js", "start": "node dist/index.js",
"start:src": "tsx src/index.ts" "start:src": "tsx src/index.ts"
+2 -1
View File
@@ -11,6 +11,7 @@
"node_modules", "node_modules",
"data", "data",
"dist", "dist",
"src/**/*.test.js" "src/**/*.test.js",
"src/**/*.test.ts"
] ]
} }
+1
View File
@@ -19,6 +19,7 @@
"node_modules", "node_modules",
"data", "data",
"src/**/*.test.js", "src/**/*.test.js",
"src/**/*.test.ts",
"src/services/platforms/agiso/**/*.js" "src/services/platforms/agiso/**/*.js"
] ]
} }
@@ -886,6 +886,14 @@
- `npm run build` - `npm run build`
- `npm test` 共 139 个用例通过 - `npm test` 共 139 个用例通过
237.`dist``node_modules` 和测试文件外,`apps/backend` 目录下非测试 `.js` 文件已全部迁移为 `.ts` 237.`dist``node_modules` 和测试文件外,`apps/backend` 目录下非测试 `.js` 文件已全部迁移为 `.ts`
238. 后端测试文件迁移到 `.test.ts`
- `src/**/*.test.ts` 共 33 个测试文件
239. `npm test` 改为同时查找 `.test.ts` / `.test.js``tsconfig.json``tsconfig.build.json` 排除 `.test.ts`,避免测试 mock 数据被生产编译约束
240. Docker 内验证通过:
- `npm run typecheck`
- `npm run build`
- `npm test` 共 139 个用例通过
241.`dist``node_modules` 外,`apps/backend` 目录下 `.js` 文件已全部迁移完成
## 下一步建议 ## 下一步建议