We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc7d904 commit fa315b7Copy full SHA for fa315b7
2 files changed
test/sequential/test-debugger-launch.js
test/sequential/test-debugger-launch.mjs
@@ -0,0 +1,36 @@
1
+import { skipIfInspectorDisabled } from '../common/index.mjs';
2
+skipIfInspectorDisabled();
3
+
4
+import { path } from '../common/fixtures.mjs';
5
+import startCLI from '../common/debugger.js';
6
7
+import assert from 'assert';
8
9
+const script = path('debugger', 'three-lines.js');
10
+const cli = startCLI([script]);
11
+try {
12
+ await cli.waitForInitialBreak();
13
+ await cli.waitForPrompt();
14
+ assert.match(cli.output, /debug>/, 'prints a prompt');
15
+ assert.match(
16
+ cli.output,
17
+ /< Debugger listening on [^\n]*9229/,
18
+ 'forwards child output'
19
+ );
20
+ await cli.command('["hello", "world"].join(" ")');
21
+ assert.match(cli.output, /hello world/, 'prints the result');
22
+ await cli.command('');
23
24
25
+ /hello world/,
26
+ 'repeats the last command on <enter>'
27
28
+ await cli.command('version');
29
+ assert.ok(
30
+ cli.output.includes(process.versions.v8),
31
+ 'version prints the v8 version'
32
33
+} finally {
34
+ const code = await cli.quit();
35
+ assert.strictEqual(code, 0);
36
+}
0 commit comments