Skip to content

Commit

Permalink
Add refactored assertions for winner score
Browse files Browse the repository at this point in the history
For the client-side Game model.
  • Loading branch information
caleb531 committed Sep 5, 2021
1 parent 89e647e commit ff0035c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/game/gameplay.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ describe('game', function () {
}
expect(game.winner).not.to.be.null;
expect(game.winner.name).to.equal('Human 1');
expect(game.winner.score).to.equal(1);
});

it('should win vertically', function () {
Expand All @@ -53,6 +54,7 @@ describe('game', function () {
}
expect(game.winner).not.to.be.null;
expect(game.winner.name).to.equal('Human 1');
expect(game.winner.score).to.equal(1);
});

it('should win diagonally', function () {
Expand All @@ -71,6 +73,7 @@ describe('game', function () {
}
expect(game.winner).not.to.be.null;
expect(game.winner.name).to.equal('Human 1');
expect(game.winner.score).to.equal(1);
});

it('should win with two connect-fours at once', function () {
Expand All @@ -89,6 +92,7 @@ describe('game', function () {
}
expect(game.winner).not.to.be.null;
expect(game.winner.name).to.equal('Human 1');
expect(game.winner.score).to.equal(1);
});

it('should win on connections of more than four', function () {
Expand All @@ -107,6 +111,7 @@ describe('game', function () {
}
expect(game.winner).not.to.be.null;
expect(game.winner.name).to.equal('Human 1');
expect(game.winner.score).to.equal(1);
});

it('should end when grid becomes full', function () {
Expand Down

0 comments on commit ff0035c

Please sign in to comment.