From 62665436c6ad7fd8beeddc925fbb37f0c89c0f70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=92scar=20Casajuana?= Date: Fri, 15 Sep 2023 12:09:47 +0200 Subject: [PATCH] Solve test issues appeared after SDK upgrade --- package.json | 2 +- packages/react-providers/src/client/ClientProvider.test.tsx | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9cb3e5ca..b5e47c15 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "jest": "^29.6.2", "jest-environment-jsdom": "^29.6.2", "jest-watch-typeahead": "^2.2.2", - "msw": "^1.2.5", + "msw": "^1.3.0", "prettier": "^2.8.7", "turbo": "^1.8.6" }, diff --git a/packages/react-providers/src/client/ClientProvider.test.tsx b/packages/react-providers/src/client/ClientProvider.test.tsx index 052b9654..f091d599 100644 --- a/packages/react-providers/src/client/ClientProvider.test.tsx +++ b/packages/react-providers/src/client/ClientProvider.test.tsx @@ -80,9 +80,12 @@ describe('', () => { // @ts-ignore rerender({ signer: newsigner }) + await waitFor(() => { + expect(result.current.client.wallet).toEqual(newsigner) + }) + expect(result.current.signer).not.toEqual(signer) expect(result.current.signer).toEqual(newsigner) - expect(result.current.client.wallet).toEqual(newsigner) // ensure env has not changed after changing the signer expect(result.current.env).toEqual('dev') expect(result.current.client.url).toEqual(ApiUrl.dev)