Skip to content

Commit

Permalink
test: refactor to top-level await
Browse files Browse the repository at this point in the history
PR-URL: nodejs#43366
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
meekdenzo authored Jun 19, 2022
1 parent 2609dc6 commit 94020ac
Showing 1 changed file with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
'use strict';
const common = require('../common');
import { skipIfInspectorDisabled } from '../common/index.mjs';

common.skipIfInspectorDisabled();
skipIfInspectorDisabled();

const fixtures = require('../common/fixtures');
const startCLI = require('../common/debugger');
import { path } from '../common/fixtures.mjs';
import startCLI from '../common/debugger.js';

const assert = require('assert');
import assert from 'assert';

const cli = startCLI([fixtures.path('debugger', 'three-lines.js')]);
const cli = startCLI([path('debugger', 'three-lines.js')]);

(async () => {
try {
await cli.waitForInitialBreak();
await cli.waitForPrompt();
await cli.command('exec a = function func() {}; a;');
Expand All @@ -29,6 +28,6 @@ const cli = startCLI([fixtures.path('debugger', 'three-lines.js')]);
assert.match(cli.output, /\[GeneratorFunction: function\*func\]/);
await cli.command('exec a = function * func() {}; a;');
assert.match(cli.output, /\[GeneratorFunction\]/);
})()
.finally(() => cli.quit())
.then(common.mustCall());
} finally {
cli.quit();
}

0 comments on commit 94020ac

Please sign in to comment.