You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Running a single test using --expose-internals throws an error [nodeconf code and learn] #24193
ran single test test/parallel/test-internal-errors.js by following the instructions here and got the error shown below
$ ./node --expose-internals ./test/parallel/test-internal-errors.js
/Users/lufo/w/nodeconfeu/codenlearn/node/test/common/index.js:585
throw new assert.AssertionError({
^
AssertionError [ERR_ASSERTION]: Expected "actual" to be reference-equal to "expected":
+ actual - expected
Comparison {
code: 'ERR_ASSERTION',
+ message: `Expected "actual" to be reference-equal to "expected":\n\u001b[32m+ actual\u001b[39m \u001b[31m- expected\u001b[39m\n\n Comparison {\n code: 'TEST_ERROR_1',\n\u001b[32m+\u001b[39m type: [Function: TypeError]\n\u001b[31m-\u001b[39m type: [Function: RangeError]\n }`
- message: /\+ type: \[Function: TypeError]\n- type: \[Function: RangeError]/
}
at new AssertionError (internal/assert.js:394:11)
at Object.innerFn (/Users/lufo/w/nodeconfeu/codenlearn/node/test/common/index.js:585:15)
at expectedException (assert.js:568:19)
at expectsError (assert.js:663:16)
at Function.throws (assert.js:694:3)
at Object.expectsError (/Users/lufo/w/nodeconfeu/codenlearn/node/test/common/index.js:597:12)
at Object.<anonymous> (/Users/lufo/w/nodeconfeu/codenlearn/node/test/parallel/test-internal-errors.js:79:8)
at Module._compile (internal/modules/cjs/loader.js:722:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
I don't get this error when tests are run with the following command:
$ env NODE_DISABLE_COLORS=1 ./out/Release/node --expose-internals test/parallel/test-internal-errors.js
Error [ERR_TLS_HANDSHAKE_TIMEOUT]: TLS handshake timeout
at Object.<anonymous> (/Users/bnoordhuis/src/v1.x/test/parallel/test-internal-errors.js:250:19)
at Module._compile (internal/modules/cjs/loader.js:707:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:718:10)
at Module.load (internal/modules/cjs/loader.js:605:32)
at tryModuleLoad (internal/modules/cjs/loader.js:544:12)
at Function.Module._load (internal/modules/cjs/loader.js:536:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:760:12)
at startup (internal/bootstrap/node.js:308:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:878:3)
Error [ERR_TLS_HANDSHAKE_TIMEOUT]: TLS handshake timeout
at Object.<anonymous> (/Users/bnoordhuis/src/v1.x/test/parallel/test-internal-errors.js:250:19)
at Module._compile (internal/modules/cjs/loader.js:707:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:718:10)
at Module.load (internal/modules/cjs/loader.js:605:32)
at tryModuleLoad (internal/modules/cjs/loader.js:544:12)
at Function.Module._load (internal/modules/cjs/loader.js:536:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:760:12)
at startup (internal/bootstrap/node.js:308:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:878:3)
(node:11881) internal/test/binding: These APIs are exposed only for testing and are not tracked by any versioning system or deprecation process.
$ echo $?
0
Activity
bnoordhuis commentedon Nov 6, 2018
IOW, the coloring throws it off.
refack commentedon Nov 6, 2018
Proposed (very local) fix #24204
Refs: #19723
test: disable color formating for test-internal-errors.js
test: disable color formating for test-internal-errors.js
test: disable color formating for test-internal-errors.js
test: disable color formating for test-internal-errors.js
test: disable color formating for test-internal-errors.js
test: disable color formating for test-internal-errors.js