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:
parent
8fd79ef122
commit
56e15d10dd
2 changed files with 5 additions and 3 deletions
|
|
@ -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'})");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue