Skip to content

Commit

Permalink
Minor review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Dec 14, 2015
1 parent 8ba19fb commit 48a8839
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
5 changes: 2 additions & 3 deletions test/built-ins/object/entries/exception-during-enumeration.js
Expand Up @@ -4,19 +4,18 @@
/*---
description: Object.entries should terminate if getting a value throws an exception
es7id: pending
includes: [Test262Error.js]
author: Jordan Harband
---*/

var trappedKey = {
get a() {
throw new Test262Error('This error should be re-thrown');
throw new RangeError('This error should be re-thrown');
},
get b() {
$ERROR('Should not try to get the second element');
}
};

assert.throws(Test262Error, function () {
assert.throws(RangeError, function () {
Object.entries(trappedKey);
});
4 changes: 2 additions & 2 deletions test/built-ins/object/entries/primitive-strings.js
Expand Up @@ -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[1][0], '1', 'second entry has key "1"');
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][1], 'c', 'second entry has value "c"');
assert.sameValue(result[2][0], '2', 'third entry has key "2"');
assert.sameValue(result[2][1], 'c', 'third entry has value "c"');
5 changes: 2 additions & 3 deletions test/built-ins/object/values/exception-during-enumeration.js
Expand Up @@ -4,19 +4,18 @@
/*---
description: Object.values should terminate if getting a value throws an exception
es7id: pending
includes: [Test262Error.js]
author: Jordan Harband
---*/

var trappedKey = {
get a() {
throw new Test262Error('This error should be re-thrown');
throw new RangeError('This error should be re-thrown');
},
get b() {
$ERROR('Should not try to get the second element');
}
};

assert.throws(Test262Error, function () {
assert.throws(RangeError, function () {
Object.values(trappedKey);
});
2 changes: 1 addition & 1 deletion test/built-ins/object/values/primitive-strings.js
Expand Up @@ -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[1], 'b', 'second value is "b"');
assert.sameValue(result[2], 'c', 'second value is "c"');
assert.sameValue(result[2], 'c', 'third value is "c"');
2 changes: 1 addition & 1 deletion test/built-ins/object/values/symbols-omitted.js
Expand Up @@ -22,4 +22,4 @@ var result = Object.values(obj);
assert.sameValue(Array.isArray(result), true, 'result is an array');
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`');

0 comments on commit 48a8839

Please sign in to comment.