fix: load and persist legacy inheritance ranks

This commit is contained in:
2026-07-25 21:19:24 +00:00
parent 482beb055f
commit 6272ff9882
10 changed files with 95 additions and 39 deletions
@@ -53,10 +53,7 @@ integration('RegNPC database persistence', () => {
const clean = async () => {
await db.logEntry.deleteMany({
where: {
OR: [
{ generalId: createdGeneralId },
{ year: 200, month: 1, text: { contains: 'ⓝ저장장수' } },
],
OR: [{ generalId: createdGeneralId }, { year: 200, month: 1, text: { contains: 'ⓝ저장장수' } }],
},
});
await db.generalTurn.deleteMany({ where: { generalId: createdGeneralId } });
@@ -207,7 +204,7 @@ integration('RegNPC database persistence', () => {
expect(turns).toHaveLength(30);
expect(new Set(turns.map((turn) => turn.actionCode))).toEqual(new Set(['휴식']));
const ranks = await db.rankData.findMany({ where: { generalId: createdGeneralId } });
expect(ranks).toHaveLength(41);
expect(ranks).toHaveLength(44);
expect(ranks.every((rank) => rank.nationId === 0 && rank.value === 0)).toBe(true);
expect(
await db.logEntry.findFirst({