Make the test suite fully deterministic

Seed Math.random before the game script loads, keep the game's own
seeded-games wrapper in place, and seed the scenario test too. Random
events during dayTick could replace the deadline modal and fail CI.
This commit is contained in:
Frederic Jung 2026-10-24 07:12:23 +02:00
parent 8fd79ef122
commit 56e15d10dd
No known key found for this signature in database
2 changed files with 5 additions and 3 deletions

View file

@ -16,7 +16,7 @@ test('sandbox: endless money, every unlock, nothing breaks, no badges', () => {
});
test('scenarios: rules apply, goals complete, deadlines fail, seeds repeat', () => {
const { ev, errors } = load({ seed: false });
const { ev, errors } = load();
ev("ACT.scenarios()");
assert.match(ev("document.getElementById('modalCard').textContent"), /Weekly challenge/);
ev("ACT.startScn({id:'stg'})");