test: allow specifying more known globals via ENV
update In order to provide a smoother test dev experience, with less false positives, we should allow specifying more known global symbols. This implementation uses an ENV var for said specification.
Example
end update
When debugging /test/
using JetBrains' debugger sometimes it leaked a global symbol _jb_debug_helper
:
C:\bin\dev\node\node.exe --inspect-brk=58577 D:\code\node\test\parallel\test-setproctitle.js
Debugger listening on ws://127.0.0.1:58577/bd9a5439-00dd-4040-8f4d-a9c8f983834e
For help see https://nodejs.org/en/docs/inspector
Debugger attached.
assert.js:60
throw new errors.AssertionError({
^
AssertionError [ERR_ASSERTION]: Unexpected global(s) found: _jb_debug_helper
at process.<anonymous> (D:\code\node\test\common\index.js:453:12)
at emitOne (events.js:120:20)
at process.emit (events.js:210:7)
Waiting for the debugger to disconnect...
Process finished with exit code 1
A bug report was opened upstream for said IDE Refs: https://youtrack.jetbrains.com/issue/WEB-27528
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines
Affected core subsystem(s)
test