@@ -9,33 +9,33 @@ const startCLI = require('../common/debugger');
99const assert = require ( 'assert' ) ;
1010
1111function delay ( ms ) {
12- return new Promise ( ( resolve ) => setTimeout ( resolve , ms ) ) ;
12+ return new Promise ( ( resolve ) => setTimeout ( resolve , ms ) ) ;
1313}
1414
1515// Profiles.
1616{
17- const cli = startCLI ( [ fixtures . path ( 'debugger/empty.js' ) ] ) ;
18-
19- function onFatal ( error ) {
20- cli . quit ( ) ;
21- throw error ;
22- }
23-
24- try {
25- ( async ( ) => {
26- await cli . waitForInitialBreak ( ) ;
27- await cli . waitForPrompt ( ) ;
28- await cli . command ( 'exec console.profile()' ) ;
29- assert . match ( cli . output , / u n d e f i n e d / ) ;
30- await cli . command ( 'exec console.profileEnd()' ) ;
31- await delay ( 250 )
32- assert . match ( cli . output , / u n d e f i n e d / ) ;
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 \. / ) ;
34- await cli . quit ( ) ;
35- } ) ( )
36- . then ( common . mustCall ( ) )
37- } catch ( error ) {
38- return onFatal ( error )
39- }
40-
17+ const cli = startCLI ( [ fixtures . path ( 'debugger/empty.js' ) ] ) ;
18+
19+ function onFatal ( error ) {
20+ cli . quit ( ) ;
21+ throw error ;
22+ }
23+
24+ try {
25+ ( async ( ) => {
26+ await cli . waitForInitialBreak ( ) ;
27+ await cli . waitForPrompt ( ) ;
28+ await cli . command ( 'exec console.profile()' ) ;
29+ assert . match ( cli . output , / u n d e f i n e d / ) ;
30+ await cli . command ( 'exec console.profileEnd()' ) ;
31+ await delay ( 250 ) ;
32+ assert . match ( cli . output , / u n d e f i n e d / ) ;
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 \. / ) ;
34+ await cli . quit ( ) ;
35+ } ) ( )
36+ . then ( common . mustCall ( ) ) ;
37+ } catch ( error ) {
38+ return onFatal ( error ) ;
39+ }
40+
4141}
0 commit comments