mirror of
https://github.com/tc39/test262.git
synced 2025-07-22 21:45:04 +02:00
fix test
1. "–" => " – " 2. Move the verifyProperty after assert.sameValue because it has side effect of removing that property while it is writable.
This commit is contained in:
parent
b91167622b
commit
16f3f494d3
@ -19,6 +19,10 @@ function* zip(a, b) {
|
||||
|
||||
function compare(actual, expected) {
|
||||
for (const [i, actualEntry, expectedEntry] of zip(actual, expected)) {
|
||||
// assertions
|
||||
assert.sameValue(actualEntry.type, expectedEntry.type, `type for entry ${i}`);
|
||||
assert.sameValue(actualEntry.value, expectedEntry.value, `value for entry ${i}`);
|
||||
assert.sameValue(actualEntry.source, expectedEntry.source, `source for entry ${i}`);
|
||||
|
||||
// 1.1.25_4.a Let O be ObjectCreate(%ObjectPrototype%).
|
||||
assert.sameValue(Object.getPrototypeOf(actualEntry), Object.prototype, `prototype for entry ${i}`);
|
||||
@ -28,11 +32,6 @@ function compare(actual, expected) {
|
||||
verifyProperty(actualEntry, 'value', { enumerable: true, writable: true, configurable: true });
|
||||
// 1.1.25_4.d Perform ! CreateDataPropertyOrThrow(O, "source", part.[[Source]]).
|
||||
verifyProperty(actualEntry, 'source', { enumerable: true, writable: true, configurable: true });
|
||||
|
||||
// assertions
|
||||
assert.sameValue(actualEntry.type, expectedEntry.type, `type for entry ${i}`);
|
||||
assert.sameValue(actualEntry.value, expectedEntry.value, `value for entry ${i}`);
|
||||
assert.sameValue(actualEntry.source, expectedEntry.source, `source for entry ${i}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user