mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:42:31 -05:00
- debugger: add string validation for watch(expr) - debugger: add help document for watch(index) - test: add test for watch(index) command - doc: add information on unwatch(index) option PR-URL: https://github.com/nodejs/node/pull/46947 Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
21 lines
602 B
JavaScript
21 lines
602 B
JavaScript
'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([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());
|