Skip to content

Commit

Permalink
test: change promises to async/await
Browse files Browse the repository at this point in the history
PR-URL: #44683
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
MadhulikaSharma95 authored and RafaelGSS committed Sep 26, 2022
1 parent dc7d904 commit fa315b7
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 47 deletions.
47 changes: 0 additions & 47 deletions test/sequential/test-debugger-launch.js

This file was deleted.

36 changes: 36 additions & 0 deletions test/sequential/test-debugger-launch.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { skipIfInspectorDisabled } from '../common/index.mjs';
skipIfInspectorDisabled();

import { path } from '../common/fixtures.mjs';
import startCLI from '../common/debugger.js';

import assert from 'assert';

const script = path('debugger', 'three-lines.js');
const cli = startCLI([script]);
try {
await cli.waitForInitialBreak();
await cli.waitForPrompt();
assert.match(cli.output, /debug>/, 'prints a prompt');
assert.match(
cli.output,
/< Debugger listening on [^\n]*9229/,
'forwards child output'
);
await cli.command('["hello", "world"].join(" ")');
assert.match(cli.output, /hello world/, 'prints the result');
await cli.command('');
assert.match(
cli.output,
/hello world/,
'repeats the last command on <enter>'
);
await cli.command('version');
assert.ok(
cli.output.includes(process.versions.v8),
'version prints the v8 version'
);
} finally {
const code = await cli.quit();
assert.strictEqual(code, 0);
}

0 comments on commit fa315b7

Please sign in to comment.