From c949ae59e4c7c544f8eed0b8f055c730d8936e24 Mon Sep 17 00:00:00 2001 From: mmeenapriya <42589859+mmeenapriya@users.noreply.github.com> Date: Sat, 17 Sep 2022 17:42:36 -0500 Subject: [PATCH] test: update test-debugger-scripts to use await/async -fix lint errors --- test/sequential/test-debugger-scripts.js | 49 ++++++++++++------------ 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/test/sequential/test-debugger-scripts.js b/test/sequential/test-debugger-scripts.js index 9f0b8fea5f9267..72e77f2e20e11c 100644 --- a/test/sequential/test-debugger-scripts.js +++ b/test/sequential/test-debugger-scripts.js @@ -45,30 +45,29 @@ const assert = require('assert'); // .then(() => cli.quit()) // .then(null, onFatal); -(async () => { - await cli.waitForInitialBreak(); - await cli.waitForPrompt(); - await cli.command('scripts'); - assert.match( - cli.output, - /^\* \d+: \S+debugger(?:\/|\\)three-lines\.js/m, - 'lists the user script'); - assert.doesNotMatch( - cli.output, - /\d+: node:internal\/buffer/, - 'omits node-internal scripts'); - await cli.command('scripts(true)'); - assert.match( - cli.output, - /\* \d+: \S+debugger(?:\/|\\)three-lines\.js/, - 'lists the user script'); - assert.match( - cli.output, - /\d+: node:internal\/buffer/, - 'includes node-internal scripts'); - -})() -.then(() => cli.quit()) -.then(null, onFatal); + (async () => { + await cli.waitForInitialBreak(); + await cli.waitForPrompt(); + await cli.command('scripts'); + assert.match( + cli.output, + /^\* \d+: \S+debugger(?:\/|\\)three-lines\.js/m, + 'lists the user script'); + assert.doesNotMatch( + cli.output, + /\d+: node:internal\/buffer/, + 'omits node-internal scripts'); + await cli.command('scripts(true)'); + assert.match( + cli.output, + /\* \d+: \S+debugger(?:\/|\\)three-lines\.js/, + 'lists the user script'); + assert.match( + cli.output, + /\d+: node:internal\/buffer/, + 'includes node-internal scripts'); + })() + .then(() => cli.quit()) + .then(null, onFatal); }