File tree Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -21,18 +21,21 @@ function delay(ms) {
2121 throw error ;
2222 }
2323
24- return cli . waitForInitialBreak ( )
25- . then ( ( ) => cli . waitForPrompt ( ) )
26- . then ( ( ) => cli . command ( 'exec console.profile()' ) )
27- . then ( ( ) => {
24+ try {
25+ ( async ( ) => {
26+ await cli . waitForInitialBreak ( ) ;
27+ await cli . waitForPrompt ( ) ;
28+ await cli . command ( 'exec console.profile()' ) ;
2829 assert . match ( cli . output , / u n d e f i n e d / ) ;
29- } )
30- . then ( ( ) => cli . command ( 'exec console.profileEnd()' ) )
31- . then ( ( ) => delay ( 250 ) )
32- . then ( ( ) => {
30+ await cli . command ( 'exec console.profileEnd()' ) ;
31+ await delay ( 250 ) ;
3332 assert . match ( cli . output , / u n d e f i n e d / ) ;
3433 assert . match ( cli . output , / C a p t u r e d n e w C P U p r o f i l e \. / ) ;
35- } )
36- . then ( ( ) => cli . quit ( ) )
37- . then ( null , onFatal ) ;
34+ await cli . quit ( ) ;
35+ } ) ( )
36+ . then ( common . mustCall ( ) ) ;
37+ } catch ( error ) {
38+ return onFatal ( error ) ;
39+ }
40+
3841}
You can’t perform that action at this time.
0 commit comments