Skip to content

Commit

Permalink
type assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
legobeat committed Sep 25, 2023
1 parent 223bc24 commit 4f79c2b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/SmartTransactionsController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,13 +310,17 @@ describe('SmartTransactionsController', () => {

describe('onNetworkChange', () => {
it('is triggered', () => {
networkListener({ providerConfig: { chainId: '52' } } as NetworkState);
networkListener({
providerConfig: { chainId: '52' },
} as unknown as NetworkState);
expect(smartTransactionsController.config.chainId).toBe('52');
});

it('calls poll', () => {
const checkPollSpy = jest.spyOn(smartTransactionsController, 'checkPoll');
networkListener({ providerConfig: { chainId: '2' } } as NetworkState);
networkListener({
providerConfig: { chainId: '2' },
} as unknown as NetworkState);
expect(checkPollSpy).toHaveBeenCalled();
});
});
Expand Down Expand Up @@ -357,7 +361,9 @@ describe('SmartTransactionsController', () => {
'updateSmartTransactions',
);
expect(updateSmartTransactionsSpy).not.toHaveBeenCalled();
networkListener({ providerConfig: { chainId: '56' } } as NetworkState);
networkListener({
providerConfig: { chainId: '56' },
} as unknown as NetworkState);
expect(updateSmartTransactionsSpy).not.toHaveBeenCalled();
});
});
Expand Down

0 comments on commit 4f79c2b

Please sign in to comment.