diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/String/prototype/includes')
3 files changed, 13 insertions, 17 deletions
diff --git a/js/src/tests/test262/built-ins/String/prototype/includes/length.js b/js/src/tests/test262/built-ins/String/prototype/includes/length.js index c74ad3f706..8ee6ae06e9 100644 --- a/js/src/tests/test262/built-ins/String/prototype/includes/length.js +++ b/js/src/tests/test262/built-ins/String/prototype/includes/length.js @@ -13,13 +13,11 @@ includes: [propertyHelper.js] features: [String.prototype.includes] ---*/ -assert.sameValue( - String.prototype.includes.length, 1, - 'The value of `String.prototype.includes.length` is `1`' -); - -verifyNotEnumerable(String.prototype.includes, 'length'); -verifyNotWritable(String.prototype.includes, 'length'); -verifyConfigurable(String.prototype.includes, 'length'); +verifyProperty(String.prototype.includes, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/String/prototype/includes/name.js b/js/src/tests/test262/built-ins/String/prototype/includes/name.js index 24bf088db4..fe8cdc1d5d 100644 --- a/js/src/tests/test262/built-ins/String/prototype/includes/name.js +++ b/js/src/tests/test262/built-ins/String/prototype/includes/name.js @@ -13,13 +13,11 @@ includes: [propertyHelper.js] features: [String.prototype.includes] ---*/ -assert.sameValue( - String.prototype.includes.name, 'includes', - 'The value of `String.prototype.includes.name` is `"includes"`' -); - -verifyNotEnumerable(String.prototype.includes, 'name'); -verifyNotWritable(String.prototype.includes, 'name'); -verifyConfigurable(String.prototype.includes, 'name'); +verifyProperty(String.prototype.includes, "name", { + value: "includes", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/String/prototype/includes/not-a-constructor.js b/js/src/tests/test262/built-ins/String/prototype/includes/not-a-constructor.js index f276a53f92..ccc6ce782d 100644 --- a/js/src/tests/test262/built-ins/String/prototype/includes/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/String/prototype/includes/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { new String.prototype.includes(1); -}, '`new String.prototype.includes(1)` throws TypeError'); +}); reportCompare(0, 0); |