Commit 06a3414 1 parent 5d92ddc commit 06a3414 Copy full SHA for 06a3414
File tree 1 file changed +13
-13
lines changed
1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -16,24 +16,24 @@ const startCLI = require('../common/debugger');
16
16
const script = fixtures . path ( 'debugger' , 'three-lines.js' ) ;
17
17
const cli = startCLI ( [ script ] ) ;
18
18
19
- function onFatal ( error ) {
20
- cli . quit ( ) ;
21
- throw error ;
22
- }
23
-
24
19
const listeningRegExp = / D e b u g g e r l i s t e n i n g o n / g;
25
20
26
- cli . waitForInitialBreak ( )
27
- . then ( ( ) => cli . waitForPrompt ( ) )
28
- . then ( ( ) => {
21
+ async function onWaitForInitialBreak ( ) {
22
+ try {
23
+ await cli . waitForInitialBreak ( ) ;
24
+ await cli . waitForPrompt ( ) ;
29
25
assert . strictEqual ( cli . output . match ( listeningRegExp ) . length , 1 ) ;
30
- } )
31
- . then ( async ( ) => {
26
+
32
27
for ( let i = 0 ; i < RESTARTS ; i ++ ) {
33
28
await cli . stepCommand ( 'restart' ) ;
34
29
assert . strictEqual ( cli . output . match ( listeningRegExp ) . length , 1 ) ;
35
30
}
36
- } )
37
- . then ( ( ) => cli . quit ( ) )
38
- . then ( null , onFatal ) ;
31
+ }
32
+ finally {
33
+ await cli . quit ( ) ;
34
+ }
35
+ }
36
+
37
+ onWaitForInitialBreak ( ) ;
39
38
}
39
+
You can’t perform that action at this time.
0 commit comments