Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix unit tests
  • Loading branch information
s1gr1d committed Jan 26, 2026
commit c8adda9ca352ca7d9728a9b92bf95a8bae0fa30f
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export async function makeCustomSentryVitePlugins(options: SentryReactRouterBuil
...sentryVitePlugins.filter(plugin => {
return [
'sentry-telemetry-plugin',
'sentry-vite-release-injection-plugin',
'sentry-vite-injection-plugin',
Comment thread
sentry[bot] marked this conversation as resolved.
Comment thread
cursor[bot] marked this conversation as resolved.
...(reactComponentAnnotation?.enabled || unstable_sentryVitePluginOptions?.reactComponentAnnotation?.enabled
? ['sentry-vite-component-name-annotate-plugin']
: []),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ vi.mock('@sentry/vite-plugin', () => ({
.fn()
.mockReturnValue([
{ name: 'sentry-telemetry-plugin' },
{ name: 'sentry-vite-release-injection-plugin' },
{ name: 'sentry-vite-injection-plugin' },
{ name: 'sentry-vite-component-name-annotate-plugin' },
{ name: 'other-plugin' },
]),
Expand Down Expand Up @@ -59,15 +59,15 @@ describe('makeCustomSentryVitePlugins', () => {
const plugins = await makeCustomSentryVitePlugins({});
expect(plugins).toHaveLength(2);
expect(plugins?.[0]?.name).toBe('sentry-telemetry-plugin');
expect(plugins?.[1]?.name).toBe('sentry-vite-release-injection-plugin');
expect(plugins?.[1]?.name).toBe('sentry-vite-injection-plugin');
});

it('should include component annotation plugin when reactComponentAnnotation.enabled is true', async () => {
const plugins = await makeCustomSentryVitePlugins({ reactComponentAnnotation: { enabled: true } });

expect(plugins).toHaveLength(3);
expect(plugins?.[0]?.name).toBe('sentry-telemetry-plugin');
expect(plugins?.[1]?.name).toBe('sentry-vite-release-injection-plugin');
expect(plugins?.[1]?.name).toBe('sentry-vite-injection-plugin');
expect(plugins?.[2]?.name).toBe('sentry-vite-component-name-annotate-plugin');
});

Expand All @@ -78,7 +78,7 @@ describe('makeCustomSentryVitePlugins', () => {

expect(plugins).toHaveLength(3);
expect(plugins?.[0]?.name).toBe('sentry-telemetry-plugin');
expect(plugins?.[1]?.name).toBe('sentry-vite-release-injection-plugin');
expect(plugins?.[1]?.name).toBe('sentry-vite-injection-plugin');
expect(plugins?.[2]?.name).toBe('sentry-vite-component-name-annotate-plugin');
});
});
9 changes: 3 additions & 6 deletions packages/solidstart/test/config/withSentry.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,8 @@ describe('withSentry()', () => {
expect(names).toEqual([
'sentry-solidstart-build-instrumentation-file',
'sentry-telemetry-plugin',
'sentry-vite-release-injection-plugin',
'sentry-vite-injection-plugin',
'sentry-release-management-plugin',
'sentry-vite-debug-id-injection-plugin',
'sentry-vite-debug-id-upload-plugin',
'sentry-file-deletion-plugin',
'sentry-solidstart-update-source-map-setting',
Expand All @@ -108,9 +107,8 @@ describe('withSentry()', () => {
expect(names).toEqual([
'sentry-solidstart-build-instrumentation-file',
'sentry-telemetry-plugin',
'sentry-vite-release-injection-plugin',
'sentry-vite-injection-plugin',
'sentry-release-management-plugin',
'sentry-vite-debug-id-injection-plugin',
'sentry-vite-debug-id-upload-plugin',
'sentry-file-deletion-plugin',
'sentry-solidstart-update-source-map-setting',
Expand Down Expand Up @@ -140,9 +138,8 @@ describe('withSentry()', () => {
expect(names).toEqual([
'sentry-solidstart-build-instrumentation-file',
'sentry-telemetry-plugin',
'sentry-vite-release-injection-plugin',
'sentry-vite-injection-plugin',
'sentry-release-management-plugin',
'sentry-vite-debug-id-injection-plugin',
'sentry-vite-debug-id-upload-plugin',
'sentry-file-deletion-plugin',
'sentry-solidstart-update-source-map-setting',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ describe('sentrySolidStartVite()', () => {
expect(names).toEqual([
'sentry-solidstart-build-instrumentation-file',
'sentry-telemetry-plugin',
'sentry-vite-release-injection-plugin',
'sentry-vite-injection-plugin',
'sentry-release-management-plugin',
'sentry-vite-debug-id-injection-plugin',
'sentry-vite-debug-id-upload-plugin',
'sentry-file-deletion-plugin',
'sentry-solidstart-update-source-map-setting',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ describe('sentrySvelteKit()', () => {
'sentry-sveltekit-global-values-injection-plugin',
// default source maps plugins:
'sentry-telemetry-plugin',
'sentry-vite-release-injection-plugin',
'sentry-vite-debug-id-injection-plugin',
'sentry-vite-injection-plugin',
Comment thread
s1gr1d marked this conversation as resolved.
'sentry-sveltekit-update-source-map-setting-plugin',
'sentry-sveltekit-files-to-delete-after-upload-setting-plugin',
// custom release plugin:
Expand Down
Loading