@@ -299,40 +299,40 @@ describe('Sentry Debug ID upload mode', () => {
299299 }
300300 } ) ;
301301
302- test ( 'reads debugId from source maps' , ( ) => {
302+ test ( 'reads debugId from source maps' , async ( ) => {
303303 const sourcemapPath = path . join ( tempRoot , 'index.bundlejs.map' ) ;
304304 writeJson ( sourcemapPath , {
305305 version : 3 ,
306306 debugId : '85314830-023f-4cf1-a267-535f4e37bb17' ,
307307 } ) ;
308308
309- expect ( readSourcemapDebugId ( sourcemapPath ) ) . toBe (
309+ expect ( await readSourcemapDebugId ( sourcemapPath ) ) . toBe (
310310 '85314830-023f-4cf1-a267-535f4e37bb17' ,
311311 ) ;
312312 } ) ;
313313
314- test ( 'prefers Debug ID upload when the source map has a Debug ID' , ( ) => {
314+ test ( 'prefers Debug ID upload when the source map has a Debug ID' , async ( ) => {
315315 const sourcemapPath = path . join ( tempRoot , 'index.bundlejs.map' ) ;
316316 writeJson ( sourcemapPath , {
317317 version : 3 ,
318318 debug_id : '85314830-023f-4cf1-a267-535f4e37bb17' ,
319319 } ) ;
320320
321- expect ( resolveSentryUploadMode ( sourcemapPath ) ) . toEqual ( {
321+ expect ( await resolveSentryUploadMode ( sourcemapPath ) ) . toEqual ( {
322322 type : 'debug-id' ,
323323 debugId : '85314830-023f-4cf1-a267-535f4e37bb17' ,
324324 } ) ;
325325 } ) ;
326326
327- test ( 'uses explicit release and dist before Debug ID for legacy self-hosted fallback' , ( ) => {
327+ test ( 'uses explicit release and dist before Debug ID for legacy self-hosted fallback' , async ( ) => {
328328 const sourcemapPath = path . join ( tempRoot , 'index.bundlejs.map' ) ;
329329 writeJson ( sourcemapPath , {
330330 version : 3 ,
331331 debug_id : '85314830-023f-4cf1-a267-535f4e37bb17' ,
332332 } ) ;
333333
334334 expect (
335- resolveSentryUploadMode ( sourcemapPath , {
335+ await resolveSentryUploadMode ( sourcemapPath , {
336336 sentryRelease : 'com.example@1.0.0+10+pushy:4.1' ,
337337 sentryDist : 'pushy:4.1' ,
338338 } ) ,
@@ -343,14 +343,14 @@ describe('Sentry Debug ID upload mode', () => {
343343 } ) ;
344344 } ) ;
345345
346- test ( 'falls back to explicit release and dist when no Debug ID exists' , ( ) => {
346+ test ( 'falls back to explicit release and dist when no Debug ID exists' , async ( ) => {
347347 const sourcemapPath = path . join ( tempRoot , 'index.bundlejs.map' ) ;
348348 writeJson ( sourcemapPath , {
349349 version : 3 ,
350350 } ) ;
351351
352352 expect (
353- resolveSentryUploadMode ( sourcemapPath , {
353+ await resolveSentryUploadMode ( sourcemapPath , {
354354 sentryRelease : 'com.example@1.0.0+10+pushy:hash' ,
355355 sentryDist : 'pushy:hash' ,
356356 } ) ,
@@ -361,28 +361,28 @@ describe('Sentry Debug ID upload mode', () => {
361361 } ) ;
362362 } ) ;
363363
364- test ( 'uses SENTRY_RELEASE and SENTRY_DIST for legacy fallback' , ( ) => {
364+ test ( 'uses SENTRY_RELEASE and SENTRY_DIST for legacy fallback' , async ( ) => {
365365 process . env . SENTRY_RELEASE = 'com.example@1.0.0+10+pushy:hash' ;
366366 process . env . SENTRY_DIST = 'pushy:hash' ;
367367 const sourcemapPath = path . join ( tempRoot , 'index.bundlejs.map' ) ;
368368 writeJson ( sourcemapPath , {
369369 version : 3 ,
370370 } ) ;
371371
372- expect ( resolveSentryUploadMode ( sourcemapPath ) ) . toEqual ( {
372+ expect ( await resolveSentryUploadMode ( sourcemapPath ) ) . toEqual ( {
373373 type : 'release' ,
374374 release : 'com.example@1.0.0+10+pushy:hash' ,
375375 dist : 'pushy:hash' ,
376376 } ) ;
377377 } ) ;
378378
379- test ( 'fails loudly when neither Debug ID nor explicit release is available' , ( ) => {
379+ test ( 'fails loudly when neither Debug ID nor explicit release is available' , async ( ) => {
380380 const sourcemapPath = path . join ( tempRoot , 'index.bundlejs.map' ) ;
381381 writeJson ( sourcemapPath , {
382382 version : 3 ,
383383 } ) ;
384384
385- expect ( ( ) => resolveSentryUploadMode ( sourcemapPath ) ) . toThrow (
385+ await expect ( resolveSentryUploadMode ( sourcemapPath ) ) . rejects . toThrow (
386386 'Generated source map does not contain a Debug ID' ,
387387 ) ;
388388 } ) ;
@@ -401,15 +401,15 @@ describe('prepareSentryUploadArtifacts', () => {
401401 }
402402 } ) ;
403403
404- test ( 'aliases Android OTA bundles to the default Android bundle name' , ( ) => {
404+ test ( 'aliases Android OTA bundles to the default Android bundle name' , async ( ) => {
405405 _writeFile ( path . join ( tempRoot , 'index.bundlejs' ) , 'bundle' ) ;
406406 writeJson ( path . join ( tempRoot , 'index.bundlejs.map' ) , {
407407 version : 3 ,
408408 file : 'index.bundlejs' ,
409409 sources : [ 'src/App.tsx' ] ,
410410 } ) ;
411411
412- const artifacts = prepareSentryUploadArtifacts (
412+ const artifacts = await prepareSentryUploadArtifacts (
413413 'index.bundlejs' ,
414414 tempRoot ,
415415 'android' ,
@@ -429,8 +429,8 @@ describe('prepareSentryUploadArtifacts', () => {
429429 } ) ;
430430 } ) ;
431431
432- test ( 'keeps non-Android artifacts unchanged' , ( ) => {
433- const artifacts = prepareSentryUploadArtifacts (
432+ test ( 'keeps non-Android artifacts unchanged' , async ( ) => {
433+ const artifacts = await prepareSentryUploadArtifacts (
434434 'index.bundlejs' ,
435435 tempRoot ,
436436 'ios' ,
0 commit comments