alexjeffburke / chai-better-shallow-deep-equal

MIT License
3 stars 0 forks source link

Pass custom message along in error #5

Closed Cactusbone closed 3 years ago

Cactusbone commented 3 years ago

Using expect(undefined,"custom message").to.shallowDeepEqual({ foo: true, bar: 1 });

I get AssertionError: expected undefined to equal { foo: true, bar: 1 }

However, my custom message is lost, It would be nice to have both messages concatenated.

alexjeffburke commented 3 years ago

Hey,

Thanks for using the plug-in.

I'd definitely like it to be a good citizen with respect to the chai ecosystem, and given that custom messages are a pretty standard part of the assertion API this could be a good addition.

I need a little time to convince myself there aren't any other consequences from making this change, but otherwise it implementing the suggestion should be quite straightforward. I'll update this issue when I know more.

Thanks, Alex J Burke.

alexjeffburke commented 3 years ago

Fixed in https://github.com/alexjeffburke/chai-better-shallow-deep-equal/commit/ffbe8fec32a947847c60713b05366c4888bea6be and released as 1.1.1.

Cactusbone commented 3 years ago

Great! Thanks!