mirror of
https://github.com/tc39/test262.git
synced 2025-07-23 14:04:51 +02:00
Minor review feedback
This commit is contained in:
parent
bf378352c7
commit
3dea218911
@ -4,19 +4,18 @@
|
|||||||
/*---
|
/*---
|
||||||
description: Object.entries should terminate if getting a value throws an exception
|
description: Object.entries should terminate if getting a value throws an exception
|
||||||
es7id: pending
|
es7id: pending
|
||||||
includes: [Test262Error.js]
|
|
||||||
author: Jordan Harband
|
author: Jordan Harband
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var trappedKey = {
|
var trappedKey = {
|
||||||
get a() {
|
get a() {
|
||||||
throw new Test262Error('This error should be re-thrown');
|
throw new RangeError('This error should be re-thrown');
|
||||||
},
|
},
|
||||||
get b() {
|
get b() {
|
||||||
$ERROR('Should not try to get the second element');
|
$ERROR('Should not try to get the second element');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
assert.throws(Test262Error, function () {
|
assert.throws(RangeError, function () {
|
||||||
Object.entries(trappedKey);
|
Object.entries(trappedKey);
|
||||||
});
|
});
|
||||||
|
@ -16,5 +16,5 @@ assert.sameValue(result[0][0], '0', 'first entry has key "0"');
|
|||||||
assert.sameValue(result[0][1], 'a', 'first entry has value "a"');
|
assert.sameValue(result[0][1], 'a', 'first entry has value "a"');
|
||||||
assert.sameValue(result[1][0], '1', 'second entry has key "1"');
|
assert.sameValue(result[1][0], '1', 'second entry has key "1"');
|
||||||
assert.sameValue(result[1][1], 'b', 'second entry has value "b"');
|
assert.sameValue(result[1][1], 'b', 'second entry has value "b"');
|
||||||
assert.sameValue(result[2][0], '2', 'second entry has key "2"');
|
assert.sameValue(result[2][0], '2', 'third entry has key "2"');
|
||||||
assert.sameValue(result[2][1], 'c', 'second entry has value "c"');
|
assert.sameValue(result[2][1], 'c', 'third entry has value "c"');
|
||||||
|
@ -4,19 +4,18 @@
|
|||||||
/*---
|
/*---
|
||||||
description: Object.values should terminate if getting a value throws an exception
|
description: Object.values should terminate if getting a value throws an exception
|
||||||
es7id: pending
|
es7id: pending
|
||||||
includes: [Test262Error.js]
|
|
||||||
author: Jordan Harband
|
author: Jordan Harband
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var trappedKey = {
|
var trappedKey = {
|
||||||
get a() {
|
get a() {
|
||||||
throw new Test262Error('This error should be re-thrown');
|
throw new RangeError('This error should be re-thrown');
|
||||||
},
|
},
|
||||||
get b() {
|
get b() {
|
||||||
$ERROR('Should not try to get the second element');
|
$ERROR('Should not try to get the second element');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
assert.throws(Test262Error, function () {
|
assert.throws(RangeError, function () {
|
||||||
Object.values(trappedKey);
|
Object.values(trappedKey);
|
||||||
});
|
});
|
||||||
|
@ -14,4 +14,4 @@ assert.sameValue(result.length, 3, 'result has 3 items');
|
|||||||
|
|
||||||
assert.sameValue(result[0], 'a', 'first value is "a"');
|
assert.sameValue(result[0], 'a', 'first value is "a"');
|
||||||
assert.sameValue(result[1], 'b', 'second value is "b"');
|
assert.sameValue(result[1], 'b', 'second value is "b"');
|
||||||
assert.sameValue(result[2], 'c', 'second value is "c"');
|
assert.sameValue(result[2], 'c', 'third value is "c"');
|
||||||
|
@ -22,4 +22,4 @@ var result = Object.values(obj);
|
|||||||
assert.sameValue(Array.isArray(result), true, 'result is an array');
|
assert.sameValue(Array.isArray(result), true, 'result is an array');
|
||||||
assert.sameValue(result.length, 1, 'result has 1 item');
|
assert.sameValue(result.length, 1, 'result has 1 item');
|
||||||
|
|
||||||
assert.sameValue(result[0][1], symValue, 'first value is `symValue`');
|
assert.sameValue(result[0], symValue, 'first value is `symValue`');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user