| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,5 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | 2 | const common = require('../common'); | |
| 3 | - | ||
| 4 | 3 | common.skipIfInspectorDisabled(); | |
| 5 | 4 | ||
| 6 | 5 | const fixtures = require('../common/fixtures'); | |
@@ -9,22 +8,18 @@ const startCLI = require('../common/debugger'); | |||
| 9 | 8 | const assert = require('assert'); | |
| 10 | 9 | ||
| 11 | 10 | // Random port with --inspect-port=0. | |
| 12 | - { | ||
| 13 | - const script = fixtures.path('debugger', 'three-lines.js'); | ||
| 11 | + const script = fixtures.path('debugger', 'three-lines.js'); | ||
| 14 | 12 | ||
| 15 | - const cli = startCLI(['--inspect-port=0', script]); | ||
| 13 | + const cli = startCLI(['--inspect-port=0', script]); | ||
| 16 | 14 | ||
| 17 | - cli.waitForInitialBreak() | ||
| 18 | - .then(() => cli.waitForPrompt()) | ||
| 19 | - .then(() => { | ||
| 20 | - assert.match(cli.output, /debug>/, 'prints a prompt'); | ||
| 21 | - assert.match( | ||
| 22 | - cli.output, | ||
| 23 | - /< Debugger listening on /, | ||
| 24 | - 'forwards child output'); | ||
| 25 | - }) | ||
| 26 | - .then(() => cli.quit()) | ||
| 27 | - .then((code) => { | ||
| 28 | - assert.strictEqual(code, 0); | ||
| 29 | - }); | ||
| 30 | - } | ||
| 15 | + (async () => { | ||
| 16 | + await cli.waitForInitialBreak(); | ||
| 17 | + await cli.waitForPrompt(); | ||
| 18 | + assert.match(cli.output, /debug>/, 'prints a prompt'); | ||
| 19 | + assert.match( | ||
| 20 | + cli.output, | ||
| 21 | + /< Debugger listening on /, | ||
| 22 | + 'forwards child output'); | ||
| 23 | + const code = await cli.quit(); | ||
| 24 | + assert.strictEqual(code, 0); | ||
| 25 | + })().then(common.mustCall()); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments