diff options
author | Chandana <100327450+chanduMe@users.noreply.github.com> | 2022-09-30 02:29:11 +0300 |
---|---|---|
committer | Danielle Adams <adamzdanielle@gmail.com> | 2022-10-05 13:54:17 +0300 |
commit | 9f14625fe5356e5fdb27b0fa8281a2d49e5c88c8 (patch) | |
tree | a58a4528e2f776dd0e1a5cd6f922e1e7be8d87d7 /test | |
parent | 8033ad846b86f4e8d4830f42ef5a5d607d49d000 (diff) |
test: use async/await in test-debugger-help
PR-URL: https://github.com/nodejs/node/pull/44686
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/sequential/test-debugger-help.js | 27 | ||||
-rw-r--r-- | test/sequential/test-debugger-help.mjs | 19 |
2 files changed, 19 insertions, 27 deletions
diff --git a/test/sequential/test-debugger-help.js b/test/sequential/test-debugger-help.js deleted file mode 100644 index e24f873212b..00000000000 --- a/test/sequential/test-debugger-help.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; -const common = require('../common'); - -common.skipIfInspectorDisabled(); - -const fixtures = require('../common/fixtures'); -const startCLI = require('../common/debugger'); - -const assert = require('assert'); - -{ - const cli = startCLI([fixtures.path('debugger/empty.js')]); - - function onFatal(error) { - cli.quit(); - throw error; - } - - return cli.waitForInitialBreak() - .then(() => cli.waitForPrompt()) - .then(() => cli.command('help')) - .then(() => { - assert.match(cli.output, /run, restart, r\s+/m); - }) - .then(() => cli.quit()) - .then(null, onFatal); -} diff --git a/test/sequential/test-debugger-help.mjs b/test/sequential/test-debugger-help.mjs new file mode 100644 index 00000000000..64f569831fb --- /dev/null +++ b/test/sequential/test-debugger-help.mjs @@ -0,0 +1,19 @@ +import { skipIfInspectorDisabled } from '../common/index.mjs'; + +skipIfInspectorDisabled(); + +import { path } from '../common/fixtures.mjs'; +import startCLI from '../common/debugger.js'; + +import assert from 'assert'; + +const cli = startCLI([path('debugger', 'empty.js')]); + +try { + await cli.waitForInitialBreak(); + await cli.waitForPrompt(); + await cli.command('help'); + assert.match(cli.output, /run, restart, r\s+/m); +} finally { + cli.quit(); +} |