From 1065630d29028ac3126f4beab0cac217a2448d73 Mon Sep 17 00:00:00 2001 From: Frederic Jung Date: Thu, 29 Oct 2026 19:38:23 +0100 Subject: [PATCH] Make the #134 exchange-name test independent of which failure the dice pick --- tests/issues.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/issues.test.js b/tests/issues.test.js index da2fa5d..6778ef4 100644 --- a/tests/issues.test.js +++ b/tests/issues.test.js @@ -1310,7 +1310,7 @@ test('#134 an exchange named after its city does not repeat the city in messages const labs = JSON.parse(ev("JSON.stringify(lagsN().filter(o=>o.k==='ix').map(o=>o.lab))")); assert.ok(labs.includes('IX.brrr Campinas LAG'), labs.join(' | ')); assert.ok(labs.some(l => / LAG in Frankfurt$/.test(l)), labs.join(' | ')); - ev("S.inc=[];eval('('+fireFailure.toString().replace('type=pick(f);}',\"type='maxpfx';}\").replace(\"const c=pick(Object.keys(S.ixp));\",\"const c='cpq';\")+')')()"); + ev("S.inc=[];eval('('+fireFailure.toString().replace(\"if(type==='funny'){\",\"type='funny';if(type==='funny'){\").replace('type=pick(f);}',\"type='maxpfx';}\").replace(\"const c=pick(Object.keys(S.ixp));\",\"const c='cpq';\")+')')()"); const msg = ev("S.inc.map(i=>i.msg).join(' ')"); assert.match(msg, /IX\.brrr Campinas/); assert.doesNotMatch(msg, /in Campinas/);