Skip to content

Commit 9cdc10a

Browse files
committed
feat(solidjs): Revert locaiton of spy creation
1 parent 1b1ced2 commit 9cdc10a

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

packages/astro/test/client/sdk.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import { SDK_VERSION, getClient } from '@sentry/browser';
1212
import { vi } from 'vitest';
1313
import { init } from '../../../astro/src/client/sdk';
1414

15+
const browserInit = vi.spyOn(SentryBrowser, 'init');
16+
1517
describe('Sentry client SDK', () => {
1618
describe('init', () => {
17-
const browserInit = vi.spyOn(SentryBrowser, 'init');
18-
1919
afterEach(() => {
2020
vi.clearAllMocks();
2121

packages/solidjs/test/sdk.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import * as SentryBrowser from '@sentry/browser';
44
import { vi } from 'vitest';
55
import { init as solidInit } from '../src/sdk';
66

7-
describe('Initialize SolidJS SDk', () => {
8-
const browserInit = vi.spyOn(SentryBrowser, 'init');
7+
const browserInit = vi.spyOn(SentryBrowser, 'init');
98

9+
describe('Initialize SolidJS SDk', () => {
1010
beforeEach(() => {
1111
vi.clearAllMocks();
1212
});

packages/svelte/test/sdk.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,15 @@ import { detectAndReportSvelteKit, init as svelteInit, isSvelteKitApp } from '..
77

88
let passedEventProcessor: EventProcessor | undefined;
99

10-
describe('Initialize Svelte SDk', () => {
11-
const browserInit = vi.spyOn(SentryBrowser, 'init');
10+
const browserInit = vi.spyOn(SentryBrowser, 'init');
11+
const addEventProcessor = vi
12+
.spyOn(SentryBrowser, 'addEventProcessor')
13+
.mockImplementation((eventProcessor: EventProcessor) => {
14+
passedEventProcessor = eventProcessor;
15+
return () => {};
16+
});
1217

18+
describe('Initialize Svelte SDk', () => {
1319
beforeEach(() => {
1420
vi.clearAllMocks();
1521
});
@@ -67,12 +73,6 @@ describe('Initialize Svelte SDk', () => {
6773
});
6874

6975
describe('detectAndReportSvelteKit()', () => {
70-
const addEventProcessor = vi
71-
.spyOn(SentryBrowser, 'addEventProcessor')
72-
.mockImplementation((eventProcessor: EventProcessor) => {
73-
passedEventProcessor = eventProcessor;
74-
return () => {};
75-
});
7676
const originalHtmlBody = document.body.innerHTML;
7777
beforeEach(() => {
7878
vi.clearAllMocks();

0 commit comments

Comments
 (0)