• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2const common = require('../common');
3
4common.skipIfInspectorDisabled();
5
6const fixtures = require('../common/fixtures');
7const startCLI = require('../common/debugger');
8
9const assert = require('assert');
10
11// Random port.
12{
13  const script = fixtures.path('debugger', 'three-lines.js');
14
15  const cli = startCLI(['--port=0', script]);
16
17  cli.waitForInitialBreak()
18    .then(() => cli.waitForPrompt())
19    .then(() => {
20      assert.match(cli.output, /debug>/, 'prints a prompt');
21      assert.match(
22        cli.output,
23        /< Debugger listening on /,
24        'forwards child output');
25    })
26    .then(() => cli.quit())
27    .then((code) => {
28      assert.strictEqual(code, 0);
29    });
30}
31