Skip to content

Commit

Permalink
test: add more tests in for english game
Browse files Browse the repository at this point in the history
  • Loading branch information
loks0n committed Mar 29, 2023
1 parent c0c2df4 commit f5610f4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/english/game.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ describe('start position', () => {
test('can make opening move', () => {
assert.doesNotThrow(() => {
draughts.move({ origin: 8, destination: 12, captures: [] });
assert.equal(draughts.player, DraughtsPlayer.LIGHT);
});
});

test('invalid move throws an error', () => {
assert.throws(() => {
draughts.move({ origin: 8, destination: 14, captures: [] });
});
});
});

0 comments on commit f5610f4

Please sign in to comment.