Files
reverse-engineering-anything/tests/boundary/inspector
David Muñoz Rey 93bf4df3e4 test(inspector): spell Node discovery targets as Node reports them (#10663)
* test(inspector): spell Node discovery targets as Node reports them

The fake V8 Inspector gave Node-type targets a percent-encoded WHATWG file
URL, while Node's /json/list reports `file://` plus the raw pathname with
quotes and backslashes replaced by underscores. The product reads that
channel literally, so a TMPDIR containing a space or percent sign named a
pathname that did not exist and the target stayed unresolved: the
Inspector cancellation test and "includes targets outside the old caller
root filter" failed on unrelated assertions.

Add nodeDiscoveryTargetUrl to the fake and use it where a resolved Node
target location is asserted. The underscore case stays with
createNodeDiscoveryTempDirectory.

Validation: 69 inspector/browser/MCP/acceptance test files, 1168/1168
passing under TMPDIR spellings with an underscore, a space, a percent sign
and none; check:fast passes.

Refs morluto/rea#9996

* test(inspector): pin special-character Node discovery spellings

Review follow-up for Node discovery target URLs.

Neither caller gave nodeDiscoveryTargetUrl an explicit special-character
path, so spaces and percent signs were exercised only when TMPDIR
happened to contain them. A boundary case now lists two targets in one
discovery root. "with space %41.js" is reported literally and resolves
to its file. 'with "quote".js' is reported with underscores and stays
an unresolved, unverifiable file location.

Tests: tests/boundary/inspector/javascriptRuntimeObservation.test.ts
passes (31).

* test(inspector): spell the consolidated target listing as Node reports it

main folded the test this branch had respelled into "lists all
connectable targets on the selected endpoint across directories", which
still built its two discovery targets with pathToFileURL. Under a
temporary directory with a space or a percent sign those targets came
back unresolved and the file-location assertions failed.

Build them with nodeDiscoveryTargetUrl, as the rest of this branch does.
2026-11-18 10:48:59 -05:00
..