diff --git a/harness/propertyHelper.js b/harness/propertyHelper.js index ac273750f4..e63701b1ff 100644 --- a/harness/propertyHelper.js +++ b/harness/propertyHelper.js @@ -45,6 +45,19 @@ function verifyProperty(obj, name, desc, options) { return true; } + var names = Object.getOwnPropertyNames(desc); + for (var i = 0; i < names.length; i++) { + assert( + names[i] === "value" || + names[i] === "writable" || + names[i] === "enumerable" || + names[i] === "configurable" || + names[i] === "get" || + names[i] === "set", + "Invalid descriptor field: " + names[i], + ); + } + assert( Object.prototype.hasOwnProperty.call(obj, name), "obj should have an own property " + nameStr diff --git a/test/built-ins/ArrayBuffer/prototype/transfer/name.js b/test/built-ins/ArrayBuffer/prototype/transfer/name.js index 2888f3be22..d870dc9c3f 100644 --- a/test/built-ins/ArrayBuffer/prototype/transfer/name.js +++ b/test/built-ins/ArrayBuffer/prototype/transfer/name.js @@ -22,6 +22,6 @@ includes: [propertyHelper.js] verifyProperty(ArrayBuffer.prototype.transfer, 'name', { value: 'transfer', enumerable: false, - wrtiable: false, + writable: false, configurable: true }); diff --git a/test/built-ins/ArrayBuffer/prototype/transferToFixedLength/name.js b/test/built-ins/ArrayBuffer/prototype/transferToFixedLength/name.js index 159c80d18e..cca11b7f8e 100644 --- a/test/built-ins/ArrayBuffer/prototype/transferToFixedLength/name.js +++ b/test/built-ins/ArrayBuffer/prototype/transferToFixedLength/name.js @@ -22,6 +22,6 @@ includes: [propertyHelper.js] verifyProperty(ArrayBuffer.prototype.transferToFixedLength, 'name', { value: 'transferToFixedLength', enumerable: false, - wrtiable: false, + writable: false, configurable: true }); diff --git a/test/built-ins/Error/cause_property.js b/test/built-ins/Error/cause_property.js index 87d631e072..f6dc47729f 100644 --- a/test/built-ins/Error/cause_property.js +++ b/test/built-ins/Error/cause_property.js @@ -29,7 +29,7 @@ var error = new Error(message, { cause }); verifyProperty(error, "cause", { configurable: true, enumerable: false, - writeable: true, + writable: true, value: cause, }); diff --git a/test/built-ins/NativeErrors/AggregateError/cause-property.js b/test/built-ins/NativeErrors/AggregateError/cause-property.js index 91b55ec11a..05e2cf0713 100644 --- a/test/built-ins/NativeErrors/AggregateError/cause-property.js +++ b/test/built-ins/NativeErrors/AggregateError/cause-property.js @@ -31,7 +31,7 @@ var error = new AggregateError(errors, message, { cause }); verifyProperty(error, "cause", { configurable: true, enumerable: false, - writeable: true, + writable: true, value: cause, }); diff --git a/test/built-ins/NativeErrors/cause_property_native_error.js b/test/built-ins/NativeErrors/cause_property_native_error.js index 637e7f10e2..f922bc1026 100644 --- a/test/built-ins/NativeErrors/cause_property_native_error.js +++ b/test/built-ins/NativeErrors/cause_property_native_error.js @@ -36,7 +36,7 @@ for (var i = 0; i < nativeErrors.length; ++i) { verifyProperty(error, "cause", { configurable: true, enumerable: false, - writeable: true, + writable: true, value: cause, });