测试数据生成

This commit is contained in:
2026-07-21 17:52:34 +08:00 Unverified
parent 5477a261f8
commit 607b71e4f0
5 changed files with 199 additions and 75 deletions
+2 -1
View File
@@ -83,7 +83,8 @@ process.env.SQLITE_PATH = testDb;
const seededTestDatabase = await createDatabase({
root,
seed: () => {
const state = createSeedDatabase({ nowIso: () => new Date().toISOString(), hashPassword });
// 全量 1200 人规模由 seed.test.mjs 单独验证;端到端流程使用较小样本控制运行时间。
const state = createSeedDatabase({ nowIso: () => new Date().toISOString(), hashPassword, candidateCount: 360 });
const currentSuperAdmin = state.users.find(user => user.role === 'admin' && user.adminLevel === 'super');
state.users.push({
...currentSuperAdmin,