Skip to content

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

Closed
@lufzle

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.testIssues and PRs related to the tests.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions