We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 61ad09f commit 87b4fa1Copy full SHA for 87b4fa1
packages/cloudflare/test/sdk.test.ts
@@ -1,13 +1,17 @@
1
import { describe, expect, test, vi } from 'vitest';
2
3
import * as SentryCore from '@sentry/core';
4
+import { CloudflareClient } from '../src/client';
5
import { init } from '../src/sdk';
6
7
describe('init', () => {
8
test('should call initAndBind with the correct options', () => {
9
const initAndBindSpy = vi.spyOn(SentryCore, 'initAndBind');
- init({});
10
+ const client = init({});
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);
16
});
17
0 commit comments