Skip to content

Commit 87b4fa1

Browse files
committed
test: Update init tests
1 parent 61ad09f commit 87b4fa1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/cloudflare/test/sdk.test.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
import { describe, expect, test, vi } from 'vitest';
22

33
import * as SentryCore from '@sentry/core';
4+
import { CloudflareClient } from '../src/client';
45
import { init } from '../src/sdk';
56

67
describe('init', () => {
78
test('should call initAndBind with the correct options', () => {
89
const initAndBindSpy = vi.spyOn(SentryCore, 'initAndBind');
9-
init({});
10+
const client = init({});
1011

11-
expect(initAndBindSpy).toHaveBeenCalledWith(expect.any(Function), expect.any(Object));
12+
expect(initAndBindSpy).toHaveBeenCalledWith(CloudflareClient, expect.any(Object));
13+
14+
expect(client).toBeDefined();
15+
expect(client).toBeInstanceOf(CloudflareClient);
1216
});
1317
});

0 commit comments

Comments
 (0)