michelsalib / chai-shallow-deep-equal

Shallow deep equal for chai
20 stars 9 forks source link

add shallowDeepEqual for PromisedAssertion (For Chai as promised) #17

Open kajann opened 6 years ago

kajann commented 6 years ago

The below code has error Property 'shallowDeepEqual' does not exist on type 'PromisedAssertion'.

return expect(findUser(userId))
    .to.be.rejected
    .and.to.eventually.be.shallowDeepEqual({
        statusCode: 404,
        body: {
            message: 'user not found'
        }
    });
delprofundo commented 6 years ago

Is this why any test that combines shallowDeepEqual with chai-as-promised always returns an empty object? shallowDeepEqual solves a problem I have but only in connection with as promised. Is this going to be remedied soon? Cheers