From c56610b179b492303f0a88999111a79bd6b862cc Mon Sep 17 00:00:00 2001 From: hided62 Date: Sun, 30 Aug 2026 07:50:39 +0000 Subject: [PATCH] =?UTF-8?q?test:=20=ED=98=84=EC=9E=AC=20=EC=8B=A4=ED=8C=A8?= =?UTF-8?q?=ED=95=9C=20=EC=9B=94=EA=B0=84=20=EA=B2=BD=EA=B3=84=20=EA=B2=80?= =?UTF-8?q?=EC=A6=9D=EC=9D=84=20=EA=B5=90=EC=A0=95=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ref의 반복 월 경계 처리와 Core의 장기 backlog 재개 순서를 반영하고, 제거된 시나리오 catalog 검사에서 남은 미사용 선언을 정리한다. --- .../test/monthlyCatalogCoverage.test.ts | 2 -- .../test/unificationInvaderResume.test.ts | 17 +++++++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/app/game-engine/test/monthlyCatalogCoverage.test.ts b/app/game-engine/test/monthlyCatalogCoverage.test.ts index 4db06a99..4329bfce 100644 --- a/app/game-engine/test/monthlyCatalogCoverage.test.ts +++ b/app/game-engine/test/monthlyCatalogCoverage.test.ts @@ -4,7 +4,6 @@ import path from 'node:path'; import { fileURLToPath } from 'node:url'; import { describe, expect, it } from 'vitest'; -import { resolveScenarioDefaultsPath } from '../src/scenario/scenarioLoader.js'; import { MONTHLY_EVENT_ACTION_CATALOG, type MonthlyEventActionName } from '../src/turn/monthlyEventHandler.js'; import { hasRefSourceRoot, resolveRefSourceRoot } from './refSourceRoot.js'; @@ -136,7 +135,6 @@ const segments = [ }, ] as const satisfies readonly CatalogSegment[]; -const KNOWN_MISSING_SCENARIO_RESOURCES = [] as const; const KNOWN_MISSING_MONTHLY_ACTIONS = [] as const; const listBasenames = async (directory: string, pattern: RegExp): Promise => diff --git a/app/game-engine/test/unificationInvaderResume.test.ts b/app/game-engine/test/unificationInvaderResume.test.ts index 2532fe11..e9b04cdc 100644 --- a/app/game-engine/test/unificationInvaderResume.test.ts +++ b/app/game-engine/test/unificationInvaderResume.test.ts @@ -234,14 +234,19 @@ describe('HWE-shaped unification invader resume', () => { loadArchivedNationMaxId: async () => 57, }); const processor = new InMemoryTurnProcessor(world); + const clock = new ManualClock(acceptedAt.getTime()); const run = vi.fn(async (...args: Parameters) => { const result = await processor.run(...args); - queue.enqueue({ type: 'shutdown', reason: 'one resumed monthly boundary verified' }); + if (world.getState().currentMonth === 4) { + queue.enqueue({ type: 'shutdown', reason: 'resumed monthly boundary verified' }); + } else { + clock.advanceMs(2_000); + } return result; }); const lifecycle = new TurnDaemonLifecycle( { - clock: new ManualClock(acceptedAt.getTime()), + clock, controlQueue: queue, getNextTickTime: (value) => addMinutes(value, 1), stateStore: new InMemoryTurnStateStore(world), @@ -270,7 +275,11 @@ describe('HWE-shaped unification invader resume', () => { }); expect(world.listNations().filter((entry) => entry.name.startsWith('ⓞ'))).toHaveLength(1); expect(world.listGenerals().filter((entry) => entry.npcState === 9)).toHaveLength(10); - expect(run).toHaveBeenCalledOnce(); - expect(lifecycle.getStatus().lastTurnTime).toBe('2026-08-19T21:15:00.000Z'); + expect(run).toHaveBeenCalledTimes(2); + expect(run.mock.calls.map(([targetTime]) => targetTime.toISOString())).toEqual([ + '2026-08-20T06:24:58.611Z', + '2026-08-20T06:25:00.000Z', + ]); + expect(lifecycle.getStatus().lastTurnTime).toBe('2026-08-20T06:25:00.000Z'); }); });