Update property-descriptor tests to use verifyProperty

This commit is contained in:
André Bargull 2017-12-21 12:08:38 -08:00 committed by Rick Waldron
parent c9ef958d01
commit 91460f90de
4 changed files with 24 additions and 20 deletions

View File

@ -5,10 +5,11 @@
es5id: 10.2.1
description: Tests that Intl.Collator.prototype has the required attributes.
author: Norbert Lindenberg
includes: [propertyHelper.js]
---*/
var desc = Object.getOwnPropertyDescriptor(Intl.Collator, "prototype");
assert.notSameValue(desc, undefined, "Intl.Collator.prototype is not defined.");
assert.sameValue(desc.writable, false, "Intl.Collator.prototype must not be writable.");
assert.sameValue(desc.enumerable, false, "Intl.Collator.prototype must not be enumerable.");
assert.sameValue(desc.configurable, false, "Intl.Collator.prototype must not be configurable.");
verifyProperty(Intl.Collator, "prototype", {
writable: false,
enumerable: false,
configurable: false,
});

View File

@ -7,10 +7,11 @@ description: >
Tests that Intl.DateTimeFormat.prototype has the required
attributes.
author: Norbert Lindenberg
includes: [propertyHelper.js]
---*/
var desc = Object.getOwnPropertyDescriptor(Intl.DateTimeFormat, "prototype");
assert.notSameValue(desc, undefined, "Intl.DateTimeFormat.prototype is not defined.");
assert.sameValue(desc.writable, false, "Intl.DateTimeFormat.prototype must not be writable.");
assert.sameValue(desc.enumerable, false, "Intl.DateTimeFormat.prototype must not be enumerable.");
assert.sameValue(desc.configurable, false, "Intl.DateTimeFormat.prototype must not be configurable.");
verifyProperty(Intl.DateTimeFormat, "prototype", {
writable: false,
enumerable: false,
configurable: false,
});

View File

@ -5,10 +5,11 @@
es5id: 11.2.1
description: Tests that Intl.NumberFormat.prototype has the required attributes.
author: Norbert Lindenberg
includes: [propertyHelper.js]
---*/
var desc = Object.getOwnPropertyDescriptor(Intl.NumberFormat, "prototype");
assert.notSameValue(desc, undefined, "Intl.NumberFormat.prototype is not defined.");
assert.sameValue(desc.writable, false, "Intl.NumberFormat.prototype must not be writable.");
assert.sameValue(desc.enumerable, false, "Intl.NumberFormat.prototype must not be enumerable.");
assert.sameValue(desc.configurable, false, "Intl.NumberFormat.prototype must not be configurable.");
verifyProperty(Intl.NumberFormat, "prototype", {
writable: false,
enumerable: false,
configurable: false,
});

View File

@ -5,10 +5,11 @@
esid: sec-properties-of-intl-pluralrules-prototype-object
description: Tests that Intl.PluralRules.prototype has the required attributes.
author: Zibi Braniecki
includes: [propertyHelper.js]
---*/
var desc = Object.getOwnPropertyDescriptor(Intl.PluralRules, "prototype");
assert.notSameValue(desc, undefined, "Intl.PluralRules.prototype is not defined.");
assert.sameValue(desc.writable, false, "Intl.PluralRules.prototype must not be writable.");
assert.sameValue(desc.enumerable, false, "Intl.PluralRules.prototype must not be enumerable.");
assert.sameValue(desc.configurable, false, "Intl.PluralRules.prototype must not be configurable.");
verifyProperty(Intl.PluralRules, "prototype", {
writable: false,
enumerable: false,
configurable: false,
});