test: cover full cathedral relay and CSS assets
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
|||||||
reset,
|
reset,
|
||||||
validateLevel,
|
validateLevel,
|
||||||
} from '../game-engine.js';
|
} from '../game-engine.js';
|
||||||
|
import { LEVELS } from '../levels.js';
|
||||||
|
|
||||||
const ONE_RELAY = [
|
const ONE_RELAY = [
|
||||||
'#########',
|
'#########',
|
||||||
@@ -117,3 +118,18 @@ test('two independent echoes can sustain a staged two-gate extraction route', ()
|
|||||||
assert.equal(state.status, 'won');
|
assert.equal(state.status, 'won');
|
||||||
assert.deepEqual(state.player, { x: 11, y: 1 });
|
assert.deepEqual(state.player, { x: 11, y: 1 });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('three independent echoes sustain the cathedral-null extraction route end-to-end', () => {
|
||||||
|
const tripleRelay = LEVELS.find((level) => level.id === 'cathedral-null');
|
||||||
|
let state = createGame(tripleRelay.map, { maxEchoes: 3 });
|
||||||
|
|
||||||
|
state = anchor(drive(state, 'DDRRRRR'));
|
||||||
|
state = anchor(drive(state, 'DDDDRRRRR'));
|
||||||
|
state = anchor(drive(state, 'RRR'));
|
||||||
|
|
||||||
|
assert.deepEqual(getActiveGateIds(state), ['A', 'B', 'C']);
|
||||||
|
|
||||||
|
state = drive(state, 'RRRRRRRRRRRR');
|
||||||
|
assert.equal(state.status, 'won');
|
||||||
|
assert.deepEqual(state.player, { x: 13, y: 1 });
|
||||||
|
});
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ test('the playable shell uses a local canvas entry point and no external runtime
|
|||||||
assert.match(html, /<script\s+type="module"\s+src="\.\/app\.js"><\/script>/);
|
assert.match(html, /<script\s+type="module"\s+src="\.\/app\.js"><\/script>/);
|
||||||
assert.match(html, /data-action="anchor"/);
|
assert.match(html, /data-action="anchor"/);
|
||||||
assert.doesNotMatch(html, /<(?:script|link|img)\b[^>]+(?:src|href)\s*=\s*["']https?:\/\//i);
|
assert.doesNotMatch(html, /<(?:script|link|img)\b[^>]+(?:src|href)\s*=\s*["']https?:\/\//i);
|
||||||
|
assert.doesNotMatch(html, /@import\s+(?:url\()?\s*["']?https?:\/\//i);
|
||||||
|
assert.doesNotMatch(html, /url\(\s*["']?https?:\/\//i);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('the runtime exposes a narrow smoke-test surface without network calls', () => {
|
test('the runtime exposes a narrow smoke-test surface without network calls', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user