Skip to content

Asserting on a property that is a specific data type #60

@pvienneau

Description

@pvienneau

Based on chai's property assertion, I am able to do the following for an object:

expect(record).to.have.property('deleted_at').that.is.a('date);

But with chai-things, I get the following error when I try to run the following code:

expect(manyRecords).to.all.have.property('deleted_at').that.is.a('date')

## AssertionError: expected [ Array(1) ] to be a date

Although removing the data type (date) assertion does pass the test, it seems to update the target of the assertion to the provided property, instead resets to the array.

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