Skip to content

testify {assert|require} packages seem to be missing NotErrorAs methods. #1066

@ndzik

Description

@ndzik

When using this gem of a library I realized that the assert and require package seem to be missing a convenience function for NotErrorAs(...).

{assert|require}.NotErrorIs(...) does exist so the absence of the error.As equivalent feels weird.

If there is a reason for this, which I do not see, I would love to be enlightened, else I would happily create a PR for this (:

Right now one has to do the following steps to check for this (which kinda breaks the feel IMHO):

var customErr *package.CustomErr
assert.Error(t, err)
assert.False(t, errors.As(err, &customErr))

or similar.

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