-
-
Notifications
You must be signed in to change notification settings - Fork 698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
contain/include bug introduced in v1.9 #239
Comments
Confirmed. On top of my head I can tell that #230 was touching include/contain, but not sure it's causing the issue. Regardless the root cause, it should be fixed and a new version will be released. Thanks for letting us know! I'll keep you posted |
fixing #239 (without changing chai.js)
The solution can be (file assertions.js): // change from
if (_.type(val) === 'object') {
// to
if (_.type(val) === 'object' && _.type(obj) !== 'array') { |
I have the same problem. |
Released in |
After upgrading from v1.8.1 to v1.9, I noticed a failed assertion when testing that an array contains an object instance.
Example:
Seems like a breaking change with
contain
/include
assertions, but I couldn't find any mention of it in the changelog.The text was updated successfully, but these errors were encountered: