mirror of
https://github.com/tc39/test262.git
synced 2025-04-08 19:35:28 +02:00
Improve assertion handling when comparison causes failure via coercion
This commit is contained in:
parent
f247a5fe09
commit
ee3715ee56
@ -27,7 +27,12 @@ assert._isSameValue = function (a, b) {
|
||||
};
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user