feat: split RU-ARK into mainland + New Earth + Severnaya Zemlya — idempotent stage, manifests 1,798 (v0.25.0, #31)

This commit is contained in:
2026-10-14 17:54:45 +00:00
parent c63f6acca1
commit f593af5ba5
10 changed files with 318 additions and 35 deletions
+16 -4
View File
@@ -27,9 +27,9 @@ describe('regions (region-key loader, v0.19 #16 P1)', () => {
expect(loadRegions(root)).toBe(true);
});
it('loads the full manifest: 1,796 unique valid region keys', () => {
it('loads the full manifest: 1,798 unique valid region keys', () => {
expect(hasRegionData()).toBe(true);
expect(validKeys().size).toBe(1796);
expect(validKeys().size).toBe(1798);
});
it('expands an ISO_A3 country to the region keys of all its sub-regions', () => {
@@ -51,6 +51,18 @@ describe('regions (region-key loader, v0.19 #16 P1)', () => {
expect(ref['aisne-gstu']).toBe('Aisne (FRA)');
});
it('expands RUS to all 82 sub-regions after the #31 Arkhangel split (no ownership gap at game init)', () => {
// #31 split RU-ARK into mainland + New Earth + Severnaya Zemlya. A fresh
// game's RUS territory (expanded from the preset's country list) must
// contain all three sub-region keys — the main one (ownership-safe,
// unchanged key) plus the two new island ones.
const rus = expandCountriesToKeys(['RUS']);
expect(rus).toHaveLength(82);
expect(rus).toContain('arkhangel-sk-lhbk');
expect(rus).toContain('new-earth-eikt');
expect(rus).toContain('severnaya-zemlya-awqp');
});
it('referenceForKeys labels only known keys and omits unknown ones', () => {
const ref = referenceForKeys(['ain-lqtt', 'not-a-real-key-xyz']);
expect(ref['ain-lqtt']).toBe('Ain (FRA)');
@@ -166,13 +178,13 @@ describe('loadRegions resolves the manifest per environment (dev public/ vs prod
it('loads from dist/ when public/ is absent (the prod container layout)', () => {
expect(loadRegions(prodRoot)).toBe(true);
expect(hasRegionData()).toBe(true);
expect(validKeys().size).toBe(1796);
expect(validKeys().size).toBe(1798);
expect(expandCountriesToKeys(['FRA'])).toHaveLength(42);
});
it('still loads from public/ (the dev layout, the first candidate)', () => {
expect(loadRegions(realRoot)).toBe(true);
expect(validKeys().size).toBe(1796);
expect(validKeys().size).toBe(1798);
});
it('a dist/ WITHOUT the adjacency manifest degrades: hasAdjacency() false, neighboursOf []', () => {