-
Notifications
You must be signed in to change notification settings - Fork 39
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
Build failing due to change in error comparison algo #58
Comments
I think providing a custom comparator for We can just add another case 'Error':
return keysEqual(leftHandOperand, rightHandOperand, ['name', 'message', 'code'], options) |
meeber
added a commit
that referenced
this issue
Sep 15, 2018
BREAKING CHANGE: As described in GH Issue #58, the previous change to the error comparison algorithm isn't compatible with IE and Safari due to those browsers adding extra enumerable properties onto `Error` objects. This commit causes `Error` objects to only include their `name`, `message`, and `code` properties in the comparison, regardless of enumerability.
keithamus
pushed a commit
that referenced
this issue
Oct 5, 2018
BREAKING CHANGE: As described in GH Issue #58, the previous change to the error comparison algorithm isn't compatible with IE and Safari due to those browsers adding extra enumerable properties onto `Error` objects. This commit causes `Error` objects to only include their `name`, `message`, and `code` properties in the comparison, regardless of enumerability.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks like #57 broke the build for IE 9 & 11 as well as Safari 10.
Apparently IE 9 & 11 add an enumerable
description
property toError
objects but not toTypeError
objects, causing one of the comparison tests to fail. Thedescription
property appears to have the same value asmessage
. (Ifmessage
anddescription
is empty, then IE 9 & 11 also add an enumerablenumber
property, but that doesn't come into play with any of the tests.)Apparently Safari 10 adds enumerable
line
,column
, andsourceURL
properties to allError
objects. This causes all of the tests to fail that expected twoError
objects to be equal, since theline
and/orcolumn
properties will always be different betweenError
objects.What a pain. I'm not sure what the right solution is here.
The text was updated successfully, but these errors were encountered: