-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
debugger: improve validations and documents for watch and unwatch
- 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: #46947 Reviewed-By: Kohei Ueno <[email protected]>
- Loading branch information
1 parent
0e3077d
commit bce37c6
Showing
4 changed files
with
34 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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([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()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters