Skip to content

assert: supported or should a userland module be used #4532

Description

@geek

In the docs at https://nodejs.org/api/assert.html it states:

it is recommended that a userland assertion library be used instead.

Is this still a valid statement, or should we remove this line as the assert module is marked as stable and locked?

Activity

  1. added
    assertIssues and PRs related to the assert subsystem.
    questionIssues asking questions about Node.js.
    on Jan 4, 2016
  2. sam-github commented on Jan 4, 2016

    @sam-github
    Contributor

    stable and locked doesn't mean "good for all purposes".

    I think the statement should be qualified to add "For the purposes of unit testing, it is recommended that a userland unit test library be used instead."

    Apparently some people think that the assert lib is for unit testing, and then complain about missing features. While it is used for unit testing in node... that is unusual, its mostly for in-source assertion of invariants.

  3. mscdex commented on Jan 5, 2016

    @mscdex
    Contributor

    +1 to what @sam-github said.

  4. mikeal commented on Jan 5, 2016

    @mikeal
    Contributor

    Could be a little stronger:

    This module is intended for the unit tests in Node.js core. It is recommended that users of Node.js choose a third party assertion library from npm.

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

    assertIssues and PRs related to the assert subsystem.questionIssues asking questions about Node.js.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions