diff --git a/packages/cloudflare/test/sdk.test.ts b/packages/cloudflare/test/sdk.test.ts index cf93a2f219cf..5be45e2a47f2 100644 --- a/packages/cloudflare/test/sdk.test.ts +++ b/packages/cloudflare/test/sdk.test.ts @@ -1,13 +1,17 @@ import { describe, expect, test, vi } from 'vitest'; import * as SentryCore from '@sentry/core'; +import { CloudflareClient } from '../src/client'; import { init } from '../src/sdk'; describe('init', () => { test('should call initAndBind with the correct options', () => { const initAndBindSpy = vi.spyOn(SentryCore, 'initAndBind'); - init({}); + const client = init({}); - expect(initAndBindSpy).toHaveBeenCalledWith(expect.any(Function), expect.any(Object)); + expect(initAndBindSpy).toHaveBeenCalledWith(CloudflareClient, expect.any(Object)); + + expect(client).toBeDefined(); + expect(client).toBeInstanceOf(CloudflareClient); }); });