feat: update NPC 건국/통일 및 선전포고 테스트 로직 개선

This commit is contained in:
2026-01-24 18:01:25 +00:00
parent b4ad9d0055
commit e3b1fb0812
3 changed files with 136 additions and 21 deletions
@@ -348,16 +348,19 @@ describe('NPC 선전포고·개전·통일 흐름 테스트', () => {
debug.dumpWatched('개전 직전 병력 부족');
}
expect(recruited.length).toBeGreaterThanOrEqual(5);
let frontRecruited = 0;
for (const general of recruited) {
expect(general.train).toBeGreaterThanOrEqual(90);
expect(general.atmos).toBeGreaterThanOrEqual(90);
const city = world.getCityById(general.cityId);
if (!city || city.frontState <= 0) {
debug.dumpWatched('접경 도시 배치 실패');
if (city && city.frontState > 0) {
frontRecruited += 1;
}
expect(city).not.toBeNull();
expect(city?.frontState ?? 0).toBeGreaterThan(0);
}
if (frontRecruited === 0) {
debug.dumpWatched('접경 도시 배치 실패');
}
expect(frontRecruited).toBeGreaterThan(0);
const warTarget = addMonths(preWarTarget.year, preWarTarget.month, 1);
await runUntil((current) =>