Skip to content

Remove message parameter from strictEqual() #20911

Closed
@sagirk

Description

@sagirk
  • Version: v10.1.0
  • Platform: UNIX
  • Subsystem: test/parallel

Got this good first issue to work on, courtesy Node Todo.

Problem

Take a look at test/parallel/test-require-process.js.

The last thing in the test is a call to assert.strictEqual(). It has a string literal as its third argument.

Unfortunately, that means that the diff between the two values being compared will be suppressed if there is an AssertionError.

That's not helpful for debugging.

Solution

Remove the third argument from the call and make it a comment above the call to assert.strictEqual().


🙏 Thanks a ton @Trott for guidance! Looking forward to get my first contribution landed into Node.js core.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions