diff --git a/packages/api/test/e2e/api.create.e2e.ts b/packages/api/test/e2e/api.create.e2e.ts index aaa68af67..c8075505b 100644 --- a/packages/api/test/e2e/api.create.e2e.ts +++ b/packages/api/test/e2e/api.create.e2e.ts @@ -51,9 +51,10 @@ describe('e2e api create', () => { expect(hash).toBeDefined(); }); - it('Should get rejected if the connection fails', async () => { + it('Should get rejected if the connection fails', async done => { const incorrectEndPoint = 'wss://rimu.unfrastructure.io/private/ws'; - expect(Api.create({ provider: incorrectEndPoint })).rejects.toThrow('Connection fail'); + await expect(Api.create({ provider: incorrectEndPoint })).rejects.toThrow('Connection fail'); + done(); }); // TODO - enable and update this test after runtime upgrade on Azalea