Skip to content

Commit 52c33cb

Browse files
committed
fix(tanstackstart-react): use path in tunnelRoute tests and type options
Align sentryTanstackStart tests with TunnelRouteOptions.path and annotate spy case with SentryTanstackStartOptions so options match the public API. Made-with: Cursor
1 parent c993616 commit 52c33cb

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

packages/tanstackstart-react/test/vite/sentryTanstackStart.test.ts

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import type { Plugin } from 'vite';
22
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
33
import { makeAutoInstrumentMiddlewarePlugin } from '../../src/vite/autoInstrumentMiddleware';
4-
import { sentryTanstackStart } from '../../src/vite/sentryTanstackStart';
4+
import {
5+
sentryTanstackStart,
6+
type SentryTanstackStartOptions,
7+
} from '../../src/vite/sentryTanstackStart';
58
import { makeTunnelRoutePlugin } from '../../src/vite/tunnelRoute';
69

710
const mockSourceMapsConfigPlugin: Plugin = {
@@ -155,7 +158,7 @@ describe('sentryTanstackStart()', () => {
155158
const plugins = sentryTanstackStart({
156159
tunnelRoute: {
157160
allowedDsns: ['https://public@o0.ingest.sentry.io/0'],
158-
tunnel: '/monitor',
161+
path: '/monitor',
159162
},
160163
sourcemaps: { disable: true },
161164
});
@@ -169,14 +172,17 @@ describe('sentryTanstackStart()', () => {
169172
});
170173

171174
it('passes tunnelRoute options through to the tunnel route plugin', () => {
172-
const tunnelRoute = {
173-
allowedDsns: ['https://public@o0.ingest.sentry.io/0'],
174-
tunnel: '/monitor' as const,
175+
const options: SentryTanstackStartOptions = {
176+
tunnelRoute: {
177+
allowedDsns: ['https://public@o0.ingest.sentry.io/0'],
178+
path: '/monitor' as const,
179+
},
180+
sourcemaps: { disable: true },
175181
};
176182

177-
sentryTanstackStart({ tunnelRoute, sourcemaps: { disable: true } });
183+
sentryTanstackStart(options);
178184

179-
expect(makeTunnelRoutePlugin).toHaveBeenCalledWith(tunnelRoute, undefined);
185+
expect(makeTunnelRoutePlugin).toHaveBeenCalledWith(options.tunnelRoute, undefined);
180186
});
181187
});
182188
});

0 commit comments

Comments
 (0)