diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/RegExp/prototype/Symbol.replace')
3 files changed, 13 insertions, 11 deletions
diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.replace/length.js b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.replace/length.js index fe89e2265b..7dce30b819 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.replace/length.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.replace/length.js @@ -19,10 +19,11 @@ includes: [propertyHelper.js] features: [Symbol.replace] ---*/ -assert.sameValue(RegExp.prototype[Symbol.replace].length, 2); - -verifyNotEnumerable(RegExp.prototype[Symbol.replace], 'length'); -verifyNotWritable(RegExp.prototype[Symbol.replace], 'length'); -verifyConfigurable(RegExp.prototype[Symbol.replace], 'length'); +verifyProperty(RegExp.prototype[Symbol.replace], "length", { + value: 2, + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.replace/name.js b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.replace/name.js index 5d6dbb13e7..512c11a769 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.replace/name.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.replace/name.js @@ -17,10 +17,11 @@ includes: [propertyHelper.js] features: [Symbol.replace] ---*/ -assert.sameValue(RegExp.prototype[Symbol.replace].name, '[Symbol.replace]'); - -verifyNotEnumerable(RegExp.prototype[Symbol.replace], 'name'); -verifyNotWritable(RegExp.prototype[Symbol.replace], 'name'); -verifyConfigurable(RegExp.prototype[Symbol.replace], 'name'); +verifyProperty(RegExp.prototype[Symbol.replace], "name", { + value: "[Symbol.replace]", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.replace/not-a-constructor.js b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.replace/not-a-constructor.js index 8fe7bd03bb..07c7a0b7a1 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.replace/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.replace/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { let re = new RegExp(''); new re[Symbol.replace](); -}, '`let re = new RegExp(\'\'); new re[Symbol.replace]()` throws TypeError'); +}); reportCompare(0, 0); |