Skip to content

Commit 30acf2d

Browse files
committed
fixup! test: update test-debugger-scripts to use await/async -fix lint errors
1 parent 77656c7 commit 30acf2d

File tree

1 file changed

+5
-36
lines changed

1 file changed

+5
-36
lines changed

test/sequential/test-debugger-scripts.js

+5-36
Original file line numberDiff line numberDiff line change
@@ -13,39 +13,8 @@ const assert = require('assert');
1313
const script = fixtures.path('debugger', 'three-lines.js');
1414
const cli = startCLI([script]);
1515

16-
function onFatal(error) {
17-
cli.quit();
18-
throw error;
19-
}
20-
21-
// return cli.waitForInitialBreak()
22-
// .then(() => cli.waitForPrompt())
23-
// .then(() => cli.command('scripts'))
24-
// .then(() => {
25-
// assert.match(
26-
// cli.output,
27-
// /^\* \d+: \S+debugger(?:\/|\\)three-lines\.js/m,
28-
// 'lists the user script');
29-
// assert.doesNotMatch(
30-
// cli.output,
31-
// /\d+: node:internal\/buffer/,
32-
// 'omits node-internal scripts');
33-
// })
34-
// .then(() => cli.command('scripts(true)'))
35-
// .then(() => {
36-
// assert.match(
37-
// cli.output,
38-
// /\* \d+: \S+debugger(?:\/|\\)three-lines\.js/,
39-
// 'lists the user script');
40-
// assert.match(
41-
// cli.output,
42-
// /\d+: node:internal\/buffer/,
43-
// 'includes node-internal scripts');
44-
// })
45-
// .then(() => cli.quit())
46-
// .then(null, onFatal);
47-
4816
(async () => {
17+
try {
4918
await cli.waitForInitialBreak();
5019
await cli.waitForPrompt();
5120
await cli.command('scripts');
@@ -66,8 +35,8 @@ const assert = require('assert');
6635
cli.output,
6736
/\d+: node:internal\/buffer/,
6837
'includes node-internal scripts');
69-
})()
70-
.then(() => cli.quit())
71-
.then(null, onFatal);
72-
38+
} finally {
39+
await cli.quit();
40+
}
41+
})().then(common.mustCall);
7342
}

0 commit comments

Comments
 (0)