Skip to content

Commit

Permalink
test: update test-debugger-scripts to use await/async -fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mmeenapriya committed Sep 17, 2022
1 parent 222d949 commit c949ae5
Showing 1 changed file with 24 additions and 25 deletions.
49 changes: 24 additions & 25 deletions test/sequential/test-debugger-scripts.js
Expand Up @@ -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);

}

0 comments on commit c949ae5

Please sign in to comment.