Skip to content

[Docs] Wrong definition of assert.ifError(value) #58572

Open
@pr4j3sh

Description

@pr4j3sh

The definition provided for assert.ifError(value) here contains value, instead of AssertionError.

Actual Definition

Throws value if value is not undefined or null. This is useful when testing the error argument in callbacks. The stack trace contains all frames from the error passed to ifError() including the potential new frames for ifError() itself.

The second word, should be AssertionError.

Changes
Changing this line in lib/assert.js would fix this issue.

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