File tree 1 file changed +14
-11
lines changed
1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -21,18 +21,21 @@ function delay(ms) {
21
21
throw error ;
22
22
}
23
23
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()' ) ;
28
29
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 ) ;
33
32
assert . match ( cli . output , / u n d e f i n e d / ) ;
34
33
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
+
38
41
}
You can’t perform that action at this time.
0 commit comments