Skip to content

Commit

Permalink
fix: add cleanup in log-game-task test
Browse files Browse the repository at this point in the history
Ran the tests a few times and now they complete
right afteer they are ran, they don't hang. What
I did was adding an afterEach in the LogGameTask
test to stop the game it started to test its
monitoring, since the random error seemed to be
caused by a game running wild and sometimes
ending badly.
  • Loading branch information
francois-roseberry committed Nov 9, 2024
1 parent b2b4242 commit f0f8d3e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client/test/unit/application/log-game-task.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ describe('The log game task', function () {
secondPlayer = state.players()[1];
});
});

afterEach(function () {
gameTask.stop()
});

it('when dice finishes rolling, sends a message', function (done) {
gameTask.rollDiceTaskCreated().take(1).subscribe(function (task) {
Expand Down

0 comments on commit f0f8d3e

Please sign in to comment.