Skip to content

Commit

Permalink
Use spy assertions not counters
Browse files Browse the repository at this point in the history
  • Loading branch information
zknill committed Sep 28, 2023
1 parent 78ad26f commit 04bddf1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Model.discontinuity.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,13 @@ describe('Model', () => {
await subscriptionCalls[0];
expect(subscriptionSpy).toHaveBeenNthCalledWith(1, null, '0');

expect(counter).toEqual(1);
await modelStatePromise(model, 'ready');

suspendChannel();
await modelStatePromise(model, 'ready');

await subscriptionCalls[1];
expect(subscriptionSpy).toHaveBeenNthCalledWith(2, null, '1');
expect(counter).toEqual(2);
expect(sync).toHaveBeenCalledTimes(2);
});
});

0 comments on commit 04bddf1

Please sign in to comment.