Skip to content

Running a single test using --expose-internals throws an error [nodeconf code and learn] #24193

Description

@lufzle
  • Version: current
  • Platform: macOS
  • Subsystem: internal

Steps followed:

  • built node by following the instructions here
  • 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:

$ python tools/test.py -J --mode=release parallel/test-internal-errors
[00:00|% 100|+   1|-   0]: Done

Activity

  1. added
    confirmed-bugIssues and PRs for confirmed bugs.
    testIssues and PRs related to Node.js core tests and test infrastructure.
    on Nov 6, 2018
  2. bnoordhuis commented on Nov 6, 2018

    @bnoordhuis
    Member
    $ 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
    

    IOW, the coloring throws it off.

  3. refack commented on Nov 6, 2018

    @refack
    Contributor

    Proposed (very local) fix #24204
    Refs: #19723

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues and PRs for confirmed bugs.testIssues and PRs related to Node.js core tests and test infrastructure.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions