diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/Number/prototype/toFixed')
3 files changed, 13 insertions, 11 deletions
diff --git a/js/src/tests/test262/built-ins/Number/prototype/toFixed/length.js b/js/src/tests/test262/built-ins/Number/prototype/toFixed/length.js index 241a60ad57..4451f57b62 100644 --- a/js/src/tests/test262/built-ins/Number/prototype/toFixed/length.js +++ b/js/src/tests/test262/built-ins/Number/prototype/toFixed/length.js @@ -22,10 +22,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Number.prototype.toFixed.length, 1); - -verifyNotEnumerable(Number.prototype.toFixed, "length"); -verifyNotWritable(Number.prototype.toFixed, "length"); -verifyConfigurable(Number.prototype.toFixed, "length"); +verifyProperty(Number.prototype.toFixed, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/prototype/toFixed/name.js b/js/src/tests/test262/built-ins/Number/prototype/toFixed/name.js index 49a7dbd1a5..3037d36cdb 100644 --- a/js/src/tests/test262/built-ins/Number/prototype/toFixed/name.js +++ b/js/src/tests/test262/built-ins/Number/prototype/toFixed/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Number.prototype.toFixed.name, "toFixed"); - -verifyNotEnumerable(Number.prototype.toFixed, "name"); -verifyNotWritable(Number.prototype.toFixed, "name"); -verifyConfigurable(Number.prototype.toFixed, "name"); +verifyProperty(Number.prototype.toFixed, "name", { + value: "toFixed", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/prototype/toFixed/not-a-constructor.js b/js/src/tests/test262/built-ins/Number/prototype/toFixed/not-a-constructor.js index 639cedbd85..bf196b8639 100644 --- a/js/src/tests/test262/built-ins/Number/prototype/toFixed/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Number/prototype/toFixed/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { new Number.prototype.toFixed(); -}, '`new Number.prototype.toFixed()` throws TypeError'); +}); reportCompare(0, 0); |