From e46ef382b076969e35b2b311e9377fb037d1ebb9 Mon Sep 17 00:00:00 2001 From: hided62 Date: Sun, 26 Jul 2026 13:47:13 +0000 Subject: [PATCH] test nation symbol last turn parity --- .../test/turnCommandNationMatrix.integration.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/integration-tests/test/turnCommandNationMatrix.integration.test.ts b/tools/integration-tests/test/turnCommandNationMatrix.integration.test.ts index ecc3b2f..d57aa1d 100644 --- a/tools/integration-tests/test/turnCommandNationMatrix.integration.test.ts +++ b/tools/integration-tests/test/turnCommandNationMatrix.integration.test.ts @@ -18,6 +18,8 @@ const readCityPopulation = (row: { population?: unknown } | undefined): number = typeof row?.population === 'number' ? row.population : 0; const readNumericField = (row: Record | undefined, field: string): number => typeof row?.[field] === 'number' ? row[field] : 0; +const readRecord = (value: unknown): Record => + typeof value === 'object' && value !== null && !Array.isArray(value) ? (value as Record) : {}; const readNationMeta = (row: { meta?: unknown } | undefined): Record => typeof row?.meta === 'object' && row.meta !== null && !Array.isArray(row.meta) ? (row.meta as Record) @@ -821,6 +823,9 @@ integration('nation name boundary parity', () => { }) ).toEqual([]); if (completed) { + expect(readNationMeta(core.after.nations.find((entry) => entry.id === 1)).turn_last_12).toEqual( + readRecord(reference.execution.outcome).lastTurn + ); expect(core.after.nations.find((entry) => entry.id === 1)?.name).toBe(nationName); expect(semanticLogSignatures(nationCommandLogs(core.after.logs))).toEqual( semanticLogSignatures(addedReferenceLogs(reference.before, reference.after.logs)) @@ -857,6 +862,9 @@ integration('nation flag boundary parity', () => { }) ).toEqual([]); if (completed) { + expect(readNationMeta(core.after.nations.find((entry) => entry.id === 1)).turn_last_12).toEqual( + readRecord(reference.execution.outcome).lastTurn + ); expect(core.after.nations.find((entry) => entry.id === 1)?.color).toBe(nationColors[expectedIndex!]); expect(semanticLogSignatures(nationCommandLogs(core.after.logs))).toEqual( semanticLogSignatures(addedReferenceLogs(reference.before, reference.after.logs))