Skip to content

Commit

Permalink
test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
adonesky1 committed Nov 9, 2021
1 parent e05e103 commit 4dccf5e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/assets/CollectibleDetectionController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ describe('CollectibleDetectionController', () => {
CollectibleDetectionController.prototype,
'detectCollectibles',
);
new CollectibleDetectionController(
const collectiblesDetectionController = new CollectibleDetectionController(
{
onCollectiblesStateChange: (listener) =>
collectiblesController.subscribe(listener),
Expand All @@ -219,6 +219,8 @@ describe('CollectibleDetectionController', () => {
},
{ interval: 10 },
);
collectiblesDetectionController.start();

expect(mockCollectibles.calledOnce).toBe(true);
setTimeout(() => {
expect(mockCollectibles.calledTwice).toBe(true);
Expand Down
4 changes: 3 additions & 1 deletion src/assets/TokenDetectionController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ describe('TokenDetectionController', () => {
TokenDetectionController.prototype,
'detectTokens',
);
new TokenDetectionController(
const tokenDetectionController = new TokenDetectionController(
{
onTokensStateChange: (listener) =>
tokensController.subscribe(listener),
Expand All @@ -192,6 +192,8 @@ describe('TokenDetectionController', () => {
},
{ interval: 10 },
);
tokenDetectionController.start();

expect(mockTokens.calledOnce).toBe(true);
setTimeout(() => {
expect(mockTokens.calledTwice).toBe(true);
Expand Down

0 comments on commit 4dccf5e

Please sign in to comment.