This commit is contained in:
Ilya Kantor 2019-12-26 14:59:57 +03:00
parent 5b195795da
commit 964ed57c42
39 changed files with 365 additions and 461 deletions

View file

@ -0,0 +1,25 @@
describe("army", function() {
let army;
before(function() {
army = makeArmy();
window.alert = sinon.stub(window, "alert");
});
it("army[0] shows 0", function() {
army[0]();
assert(alert.calledWith(0));
});
it("army[5] shows 5", function() {
army[5]();
assert(alert.calledWith(5));
});
after(function() {
window.alert.restore();
});
});