Skip to content

lib: assert.throws('string', TypeError, 'whatever') passes when it shouldn't #275

Closed
@bnoordhuis

Description

assert.throws('string', TypeError, 'whatever');  // should fail but doesn't

From here:

assert.throws() calls the first argument as a function. The result is a TypeError when the input is a string but it doesn't seem to check that the exception message matches.

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