@@ -613,13 +613,13 @@ test('prepareLockedRequestScope preserves existing-session selector validation',
613613 leaseRegistry : new LeaseRegistry ( ) ,
614614 } ) ;
615615
616- expect ( ( ) =>
616+ await expect (
617617 prepareLockedRequestScope ( {
618618 scope,
619619 sessionStore,
620620 trackDownloadableArtifact : ( ) => 'artifact-id' ,
621621 } ) ,
622- ) . toThrow ( / a l r e a d y b o u n d t o a n d r o i d d e v i c e " P i x e l " \( e m u l a t o r - 5 5 5 4 \) .* - - p l a t f o r m = i o s / i) ;
622+ ) . rejects . toThrow ( / a l r e a d y b o u n d t o a n d r o i d d e v i c e " P i x e l " \( e m u l a t o r - 5 5 5 4 \) .* - - p l a t f o r m = i o s / i) ;
623623} ) ;
624624
625625test ( 'prepareLockedRequestScope blocks commands for invalidated recordings before handlers run' , async ( ) => {
@@ -639,12 +639,14 @@ test('prepareLockedRequestScope blocks commands for invalidated recordings befor
639639 leaseRegistry : new LeaseRegistry ( ) ,
640640 } ) ;
641641
642- const result = await withDiagnosticsScope ( { command : 'snapshot' , logPath : LOG_PATH } , async ( ) =>
643- prepareLockedRequestScope ( {
644- scope,
645- sessionStore,
646- trackDownloadableArtifact : ( ) => 'artifact-id' ,
647- } ) ,
642+ const result = await withDiagnosticsScope (
643+ { command : 'snapshot' , logPath : LOG_PATH } ,
644+ async ( ) =>
645+ await prepareLockedRequestScope ( {
646+ scope,
647+ sessionStore,
648+ trackDownloadableArtifact : ( ) => 'artifact-id' ,
649+ } ) ,
648650 ) ;
649651
650652 expect ( result . type ) . toBe ( 'response' ) ;
@@ -665,7 +667,7 @@ test('prepareLockedRequestScope passes the session runner log path into handler
665667 leaseRegistry : new LeaseRegistry ( ) ,
666668 } ) ;
667669
668- const result = prepareLockedRequestScope ( {
670+ const result = await prepareLockedRequestScope ( {
669671 scope,
670672 sessionStore,
671673 trackDownloadableArtifact : ( ) => 'artifact-id' ,
@@ -694,7 +696,7 @@ test('prepareLockedRequestScope streams ordinary diagnostics into the active tra
694696 } ) ;
695697
696698 await withDiagnosticsScope ( { command : 'snapshot' , logPath : LOG_PATH } , async ( ) => {
697- const result = prepareLockedRequestScope ( {
699+ const result = await prepareLockedRequestScope ( {
698700 scope,
699701 sessionStore,
700702 trackDownloadableArtifact : ( ) => 'artifact-id' ,
0 commit comments