feat(runtime): add integration hardening and diagnostics
This commit is contained in:
@@ -104,3 +104,10 @@ test("observer protocol exposes no mutation control path", () => {
|
||||
assert.deepEqual(snapshot.players.map(item => item.cell), [0, 3]);
|
||||
assert.equal("self" in snapshot, false);
|
||||
});
|
||||
|
||||
test("finished matches expose only an owner restart intention", () => {
|
||||
const script = fs.readFileSync(path.join(project, "web/player.js"), "utf8");
|
||||
assert.match(script, /send\("restart", \{\}, byId\("modal-action"\)\)/);
|
||||
assert.match(script, /message\.type === "reset"/);
|
||||
assert.doesNotMatch(script, /restart[^\n]*(position|inventory|result):/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user