Skip to content
Merged
Changes from all commits
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
9 changes: 8 additions & 1 deletion packages/bun/test/integrations/bunserver.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { RequestEventData } from '@sentry/core';
import * as SentryCore from '@sentry/core';
import { afterEach, beforeAll, beforeEach, describe, expect, spyOn, test } from 'bun:test';
import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, spyOn, test } from 'bun:test';
import type { BunOptions } from '../../src';
import { bunServerIntegration, getDefaultIntegrationsWithoutPerformance, init } from '../../src';
import { instrumentBunServe } from '../../src/integrations/bunserver';
Expand Down Expand Up @@ -53,6 +53,13 @@ describe('Bun Serve Integration', () => {
port += 1;
});

// The spies replace `@sentry/core` exports for all test files that `bun test` runs after this one
afterAll(() => {
captureExceptionSpy.mockRestore();
continueTraceSpy.mockRestore();
startSpanSpy.mockRestore();
});

test.each(['fetch', 'route'])(
'keeps a streaming %s response span open until the last chunk is consumed',
async mode => {
Expand Down
Loading