mirror of https://github.com/tc39/test262.git
chore: migrate $ERROR -> throw new Test262Error in test/built-ins/JSON (#3087)
This commit is contained in:
parent
a912ae03a5
commit
0fce065601
|
@ -9,8 +9,8 @@ description: Tests that JSON.parse treats "__proto__" as a regular property name
|
||||||
|
|
||||||
var x = JSON.parse('{"__proto__":[]}');
|
var x = JSON.parse('{"__proto__":[]}');
|
||||||
if (Object.getPrototypeOf(x) !== Object.prototype) {
|
if (Object.getPrototypeOf(x) !== Object.prototype) {
|
||||||
$ERROR('#1: JSON.parse confused by "__proto__"');
|
throw new Test262Error('#1: JSON.parse confused by "__proto__"');
|
||||||
}
|
}
|
||||||
if (!Array.isArray(x.__proto__)) {
|
if (!Array.isArray(x.__proto__)) {
|
||||||
$ERROR('#2: JSON.parse did not set "__proto__" as a regular property');
|
throw new Test262Error('#2: JSON.parse did not set "__proto__" as a regular property');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue