test: enhance NPC simulation validation with trained generals criteria

This commit is contained in:
2026-01-24 15:26:44 +00:00
parent 815b457354
commit 3d90060c7d
2 changed files with 10 additions and 1 deletions
@@ -658,7 +658,7 @@ describe('NPC 대형 시뮬레이션', () => {
if (debugGeneralId) {
await debugRecruitConstraints(debugGeneralId);
}
dumpTraceSummary('NPC 대형 시뮬레이션 실패');
dumpTraceSummary('NPC 대형 시뮬레이션 실패', 200);
const sampleNation = world.listNations().find((nation) => nation.level >= 1 && nation.capitalCityId);
if (sampleNation) {
const policy = (sampleNation.meta as Record<string, unknown>)?.npc_nation_policy;
@@ -312,5 +312,14 @@ describe('NPC 전투준비 턴 검증', () => {
expect(trainingCounts.get('182-09') ?? 0).toBeGreaterThan(0);
expect(trainingCounts.get('182-10') ?? 0).toBeGreaterThan(0);
const trainedGenerals = world
.listGenerals()
.filter((general) => general.nationId === 1 && general.crew > 0 && general.crewTypeId > 0);
expect(trainedGenerals.length).toBeGreaterThan(0);
for (const general of trainedGenerals) {
expect(general.train).toBeGreaterThanOrEqual(70);
expect(general.atmos).toBeGreaterThanOrEqual(70);
}
});
});