Skip to content

test: test-assert.js fails locally #18967

Closed
@vsemozhetbyt

Description

@vsemozhetbyt
  • Version: 10.0.0 (master)
  • Platform: Windows 7 x64
  • Subsystem: test. assert

Testing the #18904 locally, I've got this not related error, which I can also reproduce with the last nightly:

assert.js:74
  throw new AssertionError(obj);
  ^

AssertionError [ERR_ASSERTION]: 'The expression evaluated to a falsy value:\r\n\r\n  assert((() => \'string\')()\n      // eslint-disable-next-line\n      ==... strictEqual 'The expression evaluated to a falsy value:\r\n\r\n  assert((() => \'string\')()\r\n      // eslint-disable-next-line\r\n    ...
    at Object.innerFn (test\common\index.js:701:16)
    at expectedException (assert.js:406:19)
    at Function.throws (assert.js:451:16)
    at Object.expectsError (test\common\index.js:723:12)
    at Object.<anonymous> (test\parallel\test-assert.js:642:8)
    at Module._compile (module.js:666:30)
    at Object.Module._extensions..js (module.js:677:10)
    at Module.load (module.js:577:32)
    at tryModuleLoad (module.js:517:12)
    at Function.Module._load (module.js:509:3)

It seems reasonable: this fragment uses \n on all systems, while this fragment uses \r\n on Windows.

Why does not this test fail on CI?

Metadata

Metadata

Assignees

No one assigned

    Labels

    assertIssues and PRs related to the assert subsystem.testIssues and PRs related to the tests.windowsIssues and PRs related to the Windows platform.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions