From 4799c1e5409b1da5485a23c6605d7eab67938c7b Mon Sep 17 00:00:00 2001 From: sifnoc Date: Tue, 10 Jan 2023 12:14:45 +0000 Subject: [PATCH] fix: provider destroy after test --- packages/cli/tests/unit/coordinator/configurator.test.ts | 5 +---- packages/cli/tests/unit/wallet/configurator.test.ts | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/cli/tests/unit/coordinator/configurator.test.ts b/packages/cli/tests/unit/coordinator/configurator.test.ts index 188e8b8d3..05e9ed035 100644 --- a/packages/cli/tests/unit/coordinator/configurator.test.ts +++ b/packages/cli/tests/unit/coordinator/configurator.test.ts @@ -80,14 +80,11 @@ describe('configurator', () => { }) it('with websocket provider', async () => { - const localContext = { - networkStatus: NetworkStatus.STOPPED, - } const wsProviderUrl = 'ws://localhost:8545' option.base.provider = wsProviderUrl const connection = new ConnectWeb3(option) - const ret = await connection.run(localContext) + const ret = await connection.run(context) let wsProvider = ret.context.provider as WebSocketProvider expect(wsProvider.connection.url).toEqual(wsProviderUrl) diff --git a/packages/cli/tests/unit/wallet/configurator.test.ts b/packages/cli/tests/unit/wallet/configurator.test.ts index c16532565..db1867226 100644 --- a/packages/cli/tests/unit/wallet/configurator.test.ts +++ b/packages/cli/tests/unit/wallet/configurator.test.ts @@ -103,6 +103,7 @@ describe('configurator', () => { let wsProvider = ret.context.provider as WebSocketProvider expect(wsProvider.connection.url).toEqual(wsProviderUrl) + await wsProvider.destroy() }) })