test: 현재 실패한 월간 경계 검증을 교정한다
Ref의 반복 월 경계 처리와 Core의 장기 backlog 재개 순서를 반영하고, 제거된 시나리오 catalog 검사에서 남은 미사용 선언을 정리한다.
This commit is contained in:
@@ -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<string[]> =>
|
||||
|
||||
@@ -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<InMemoryTurnProcessor['run']>) => {
|
||||
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');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user