Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: change promises to async/await #44683

Merged
merged 2 commits into from Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
@@ -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'
);
Trott marked this conversation as resolved.
Show resolved Hide resolved
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 {
Trott marked this conversation as resolved.
Show resolved Hide resolved
const code = await cli.quit();
assert.strictEqual(code, 0);
}