Merge #93: Africa, twenty-one more cities, seven cables, border costs and Cape to Cairo (Portuguese for the 41 new strings)

This commit is contained in:
Frederic Jung 2026-10-26 08:03:30 +01:00
commit 9303740311
No known key found for this signature in database
5 changed files with 171 additions and 25 deletions

View file

@ -569,3 +569,26 @@ test('a Tier 1 reaches every Latin American network through the carriers they bu
}
assert.deepEqual(errors, []);
});
test('Africa: more countries, cables along both coasts, border costs and Cape to Cairo', () => {
const { ev, errors } = load();
start(ev);
const af = JSON.parse(ev("JSON.stringify(CITIES.filter(c=>c.reg==='AF').map(c=>c.id))"));
assert.ok(af.length >= 26);
for (const c of af) {
assert.ok(ev(`!!CITY.${c}.cc&&!!CITY.${c}.ix`), `${c} has a country and an IX`);
assert.ok(ev(`NETS.some(n=>n.price&&n.pops.includes('${c}'))`), `${c} has a transit seller`);
}
for (const c of ['dkr', 'abj', 'acc', 'dla', 'lad', 'cas', 'alg', 'tun', 'jib', 'mba', 'dar', 'mpm', 'dur', 'wdh'])
assert.ok(ev(`CABLE_PAIRS.some(p=>p.a==='${c}'||p.b==='${c}')`), `${c} has a cable`);
assert.ok(ev("CABLE_PAIRS.some(p=>p.cid==='sail'&&p.a==='for'&&p.b==='dla')"), 'Brazil to Cameroon');
assert.ok(ev("CABLE_PAIRS.some(p=>p.cid==='sacs'&&p.b==='lad')"), 'Brazil to Angola');
assert.ok(ev("CABLE_PAIRS.some(p=>p.cid==='seacm'&&p.a==='jib'&&p.b==='bom')"), 'Djibouti to Mumbai');
assert.equal(ev("landMult('nbo','kla')"), 2, 'Kenya to Uganda crosses a border');
assert.equal(ev("landMult('jnb','dur')"), 1, 'inside South Africa');
assert.match(ev("landWhy('nbo','kla')"), /border/);
ev("ACT.startScn({id:'c2c',sure:1})");
assert.equal(ev('S.scn.id'), 'c2c');
assert.equal(ev('scnProg().items.length'), 4);
assert.deepEqual(errors, []);
});