Skip to content

Commit de6cb3d

Browse files
committed
fix: test fail on bun 1.3
1 parent c92202a commit de6cb3d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎packages/bun/test/plugin.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { sentryBunPlugin } from '../src/plugin';
77
const DEBUG_ID_MARKER = /sentry-dbid-([0-9a-f-]{36})/;
88
const BUN_DEBUG_ID = /\/\/# debugId=([0-9A-F]{32})/;
99

10-
function readSourceMap(bundlePath: string, source: string): { debugId?: string } {
10+
function readSourceMap(bundlePath: string, source: string): { debugId?: unknown } {
1111
const inlineMap = source.match(/^\/\/# sourceMappingURL=data:application\/json;base64,(.*)$/m)?.[1];
1212
return JSON.parse(
1313
inlineMap ? Buffer.from(inlineMap, 'base64').toString() : fs.readFileSync(`${bundlePath}.map`, 'utf8'),
@@ -52,7 +52,7 @@ describe('sentryBunPlugin', () => {
5252
expect(result.success).toBe(true);
5353

5454
const bundles = result.outputs.filter(o => o.kind === 'entry-point' || o.kind === 'chunk');
55-
expect(bundles.length).toBe(2);
55+
expect(bundles.some(bundle => bundle.kind === 'chunk')).toBe(true);
5656

5757
const debugIds = bundles.map(bundle => {
5858
const source = fs.readFileSync(bundle.path, 'utf8');

0 commit comments

Comments
 (0)