Skip to content

Commit

Permalink
Ensure that wait callback isn't called prematurely
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb531 committed Sep 24, 2021
1 parent 6a3eee2 commit 353df98
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/ai-player/misc.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ describe('AI player', function () {
const clock = sinon.useFakeTimers();
const callback = sinon.spy();
expect(aiPlayer.wait(callback));
expect(callback).not.to.have.been.calledOnce;
clock.tick(500);
expect(callback).to.have.been.calledOnce;
clock.restore();
Expand Down

0 comments on commit 353df98

Please sign in to comment.