Skip to content

doc: 'assert' description contains backwards actual/expected #3530

Description

@birnam

Documentation for assert describes:

assert(value[, message]), assert.ok(value[, message])
Tests if value is truthy. It is equivalent to assert.equal(true, !!value, message).

But assert.equal parameters are actual value first, then expected value. The documentation should read:

assert(value[, message]), assert.ok(value[, message])#
Tests if value is truthy. It is equivalent to assert.equal(!!value, true, message).

Activity

  1. added
    docIssues and PRs related to Node.js documentation.
    on Oct 26, 2015
  2. Fishrock123 commented on Oct 26, 2015

    @Fishrock123
    Contributor

    @birnam mind to make a Pull Request for it? I'd gladly review it!

  3. birnam commented on Oct 26, 2015

    @birnam
    ContributorAuthor

    Sure -- PR: #3533

  4. added
    assertIssues and PRs related to the assert subsystem.
    on Oct 26, 2015
  5. evanlucas commented on Nov 9, 2015

    @evanlucas
    Contributor

    This was landed in 471aa5a

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.docIssues and PRs related to Node.js documentation.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions