summaryrefslogtreecommitdiff
path: root/test/parallel/test-debugger-watch-validation.js
blob: 2ccd889646729df1c5029848e8e14991c2563c92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
'use strict';
const common = require('../common');

common.skipIfInspectorDisabled();

const fixtures = require('../common/fixtures');
const startCLI = require('../common/debugger');

const assert = require('assert');

const cli = startCLI(['--port=0', fixtures.path('debugger/break.js')]);

(async () => {
  await cli.waitForInitialBreak();
  await cli.command('watch()');
  await cli.waitFor(/ERR_INVALID_ARG_TYPE/);
  assert.match(cli.output, /TypeError \[ERR_INVALID_ARG_TYPE\]: The "expression" argument must be of type string\. Received undefined/);
})()
.finally(() => cli.quit())
.then(common.mustCall());