Skip to content
Snippets Groups Projects
Commit ee3715ee authored by Rick Waldron's avatar Rick Waldron
Browse files

Improve assertion handling when comparison causes failure via coercion

parent f247a5fe
No related branches found
No related tags found
No related merge requests found
...@@ -27,7 +27,12 @@ assert._isSameValue = function (a, b) { ...@@ -27,7 +27,12 @@ assert._isSameValue = function (a, b) {
}; };
assert.sameValue = function (actual, expected, message) { assert.sameValue = function (actual, expected, message) {
if (assert._isSameValue(actual, expected)) { try {
if (assert._isSameValue(actual, expected)) {
return;
}
} catch (error) {
$ERROR(message + ' (_isSameValue operation threw) ' + error);
return; return;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment