Skip to content

Unnecessary parameter in assert call in parallel/test-stream2-basic.js #21305

Closed
@djmgit

Description

  • Version: v11.0.0-pre
  • Platform: Ubuntu, x86_64 GNU/Linux
  • Subsystem: test

In file test/parallel/test-stream2-basic.js, in line 215 and 218, the third argument is a string literal ("first" on line 215 and "second" on line 218). Which means if there is an AssertionError, the cause error that is difference between expected and received will not be displayed, but only first or second will be printed on terminal which is quite odd.
Moreover, it is quite strange to specify "first" or "second" as assertion failure message as it will be clear from stack trace which assertion has failed.
So there is no need for the third argument in both of those two lines.

Activity

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

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