diff --git a/packages/client-web/__tests__/integration/web_connection.test.ts b/packages/client-web/__tests__/integration/web_connection.test.ts index 20aa5bd3..b71121bb 100644 --- a/packages/client-web/__tests__/integration/web_connection.test.ts +++ b/packages/client-web/__tests__/integration/web_connection.test.ts @@ -2,14 +2,14 @@ import { createClient } from '../../src' import type { WebClickHouseClient } from '../../src/client' describe('[Web] Connection', () => { - let fetchSpy: jasmine.Spy - beforeEach(() => { - fetchSpy = spyOn(window, 'fetch').and.returnValue( - Promise.resolve(stubResponse()) - ) - }) - describe('KeepAlive setting', () => { + let fetchSpy: jasmine.Spy + beforeEach(() => { + fetchSpy = spyOn(window, 'fetch').and.returnValue( + Promise.resolve(new Response()) + ) + }) + it('should be enabled by default', async () => { const client = createClient() const fetchParams = await pingAndGetRequestInit(client) @@ -35,8 +35,4 @@ describe('[Web] Connection', () => { return fetchParams! } }) - - function stubResponse() { - return new Response() - } })