Skip to content

Customize assertions #1094

Open
Open
@yamsellem

Description

@yamsellem

Is there a way to add some custom assertions to t existing ones?

I would like to add those basic ones:
t.instanceof(object, clazz)
t.length(array, length)
t.members(array, item, item)
t.includes(string, substring)

I guess t.context can be used, but feels cumbersome.
And maybe, those assertions can be considered to be added to ava core.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions