mirror of
https://gitlab.com/Oreolek/salet.git
synced 2024-05-19 17:38:35 +03:00
Action check
This commit is contained in:
parent
4283b1263c
commit
4809aeb390
|
@ -16,4 +16,21 @@ $(document).ready(function() {
|
||||||
assert.ok(salet.goTo(room.name), "Entered room "+room.name);
|
assert.ok(salet.goTo(room.name), "Entered room "+room.name);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
QUnit.test("There are no game-breaking bugs in all actions.", function(assert) {
|
||||||
|
for (var key in salet.rooms) {
|
||||||
|
// skip loop if the property is from prototype
|
||||||
|
if (!salet.rooms.hasOwnProperty(key)) continue;
|
||||||
|
var room = salet.rooms[key];
|
||||||
|
|
||||||
|
salet.goTo(room.name);
|
||||||
|
for (var act in room.actions) {
|
||||||
|
if (!room.actions.hasOwnProperty(act)) continue;
|
||||||
|
assert.ok(act.fcall(room), "Executed action "+act);
|
||||||
|
}
|
||||||
|
for (var act in room.writers) {
|
||||||
|
if (!room.writers.hasOwnProperty(act)) continue;
|
||||||
|
assert.ok(act.fcall(room), "Executed action "+act);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue