From 4f79c2b658e0b14e60435f12e9031c40c47b4163 Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Thu, 31 Aug 2023 04:46:51 +0000 Subject: [PATCH] type assertion --- src/SmartTransactionsController.test.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/SmartTransactionsController.test.ts b/src/SmartTransactionsController.test.ts index b072cf30..089098e9 100644 --- a/src/SmartTransactionsController.test.ts +++ b/src/SmartTransactionsController.test.ts @@ -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(); }); }); @@ -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(); }); });