Skip to content

Commit 78724a2

Browse files
committed
test(sveltekit): refactor tests to use new server-common folder
1 parent db5e5bc commit 78724a2

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

packages/sveltekit/test/server/handle.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ import type { Handle } from '@sveltejs/kit';
1414
import { redirect } from '@sveltejs/kit';
1515
import { vi } from 'vitest';
1616

17-
import { FETCH_PROXY_SCRIPT, addSentryCodeToPage, sentryHandle } from '../../src/server/handle';
17+
import { FETCH_PROXY_SCRIPT, addSentryCodeToPage } from '../../src/server-common/handle';
18+
import { sentryHandle } from '../../src/server/handle';
1819
import { getDefaultNodeClientOptions } from '../utils';
1920

2021
const mockCaptureException = vi.spyOn(SentryNode, 'captureException').mockImplementation(() => 'xx');

packages/sveltekit/test/server/handleError.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { beforeEach, describe, expect, it, vi } from 'vitest';
33
import * as SentryNode from '@sentry/node';
44
import type { HandleServerError, RequestEvent } from '@sveltejs/kit';
55

6-
import { handleErrorWithSentry } from '../../src/server/handleError';
6+
import { handleErrorWithSentry } from '../../src/server-common/handleError';
77

88
const mockCaptureException = vi.spyOn(SentryNode, 'captureException').mockImplementation(() => 'xx');
99

packages/sveltekit/test/server/load.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import * as SentryNode from '@sentry/node';
1111
import type { Load, ServerLoad } from '@sveltejs/kit';
1212
import { error, redirect } from '@sveltejs/kit';
1313

14-
import { wrapLoadWithSentry, wrapServerLoadWithSentry } from '../../src/server/load';
14+
import { wrapLoadWithSentry, wrapServerLoadWithSentry } from '../../src/server-common/load';
1515
import { getDefaultNodeClientOptions } from '../utils';
1616

1717
const mockCaptureException = vi.spyOn(SentryNode, 'captureException').mockImplementation(() => 'xx');

packages/sveltekit/test/server/rewriteFramesIntegration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { rewriteFramesIntegration } from '@sentry/browser';
22
import { basename } from '@sentry/core';
33
import type { Event, StackFrame } from '@sentry/core';
44

5-
import { rewriteFramesIteratee } from '../../src/server/rewriteFramesIntegration';
5+
import { rewriteFramesIteratee } from '../../src/server-common/rewriteFramesIntegration';
66
import type { GlobalWithSentryValues } from '../../src/vite/injectGlobalValues';
77

88
describe('rewriteFramesIteratee', () => {

packages/sveltekit/test/server/utils.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { describe, expect, it } from 'vitest';
22

3-
import { getTracePropagationData } from '../../src/server/utils';
3+
import { getTracePropagationData } from '../../src/server-common/utils';
44

55
const MOCK_REQUEST_EVENT: any = {
66
request: {

0 commit comments

Comments
 (0)