diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/Promise/prototype')
11 files changed, 37 insertions, 32 deletions
diff --git a/js/src/tests/test262/built-ins/Promise/prototype/catch/length.js b/js/src/tests/test262/built-ins/Promise/prototype/catch/length.js index 1b487e62d9..aa4a89d144 100644 --- a/js/src/tests/test262/built-ins/Promise/prototype/catch/length.js +++ b/js/src/tests/test262/built-ins/Promise/prototype/catch/length.js @@ -18,10 +18,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Promise.prototype.catch.length, 1); - -verifyNotEnumerable(Promise.prototype.catch, 'length'); -verifyNotWritable(Promise.prototype.catch, 'length'); -verifyConfigurable(Promise.prototype.catch, 'length'); +verifyProperty(Promise.prototype.catch, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Promise/prototype/catch/name.js b/js/src/tests/test262/built-ins/Promise/prototype/catch/name.js index 25a93a3bb9..4df2947d2d 100644 --- a/js/src/tests/test262/built-ins/Promise/prototype/catch/name.js +++ b/js/src/tests/test262/built-ins/Promise/prototype/catch/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Promise.prototype.catch.name, 'catch'); - -verifyNotEnumerable(Promise.prototype.catch, 'name'); -verifyNotWritable(Promise.prototype.catch, 'name'); -verifyConfigurable(Promise.prototype.catch, 'name'); +verifyProperty(Promise.prototype.catch, "name", { + value: "catch", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Promise/prototype/catch/not-a-constructor.js b/js/src/tests/test262/built-ins/Promise/prototype/catch/not-a-constructor.js index 2ff5558742..3afa8a1021 100644 --- a/js/src/tests/test262/built-ins/Promise/prototype/catch/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Promise/prototype/catch/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { let p = new Promise(() => {}); new p.catch(); -}, '`let p = new Promise(() => {}); new p.catch()` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Promise/prototype/finally/invokes-then-with-function.js b/js/src/tests/test262/built-ins/Promise/prototype/finally/invokes-then-with-function.js index c4597f9cb8..033051d03c 100644 --- a/js/src/tests/test262/built-ins/Promise/prototype/finally/invokes-then-with-function.js +++ b/js/src/tests/test262/built-ins/Promise/prototype/finally/invokes-then-with-function.js @@ -48,7 +48,7 @@ assert.sameValue(resolve.name, '', 'The value of resolve.name is ""'); assert.sameValue(isConstructor(resolve), false, 'isConstructor(resolve) must return false'); assert.throws(TypeError, () => { new resolve(); -}, '`new resolve()` throws TypeError'); +}); assert.sameValue( @@ -62,7 +62,7 @@ assert.sameValue(reject.name, '', 'The value of reject.name is ""'); assert.sameValue(isConstructor(reject), false, 'isConstructor(reject) must return false'); assert.throws(TypeError, () => { new reject(); -}, '`new reject()` throws TypeError'); +}); assert.sameValue(result, returnValue, 'The value of `result` is expected to equal the value of returnValue'); diff --git a/js/src/tests/test262/built-ins/Promise/prototype/finally/name.js b/js/src/tests/test262/built-ins/Promise/prototype/finally/name.js index 82020c1381..ad825c9f53 100644 --- a/js/src/tests/test262/built-ins/Promise/prototype/finally/name.js +++ b/js/src/tests/test262/built-ins/Promise/prototype/finally/name.js @@ -21,10 +21,11 @@ includes: [propertyHelper.js] features: [Promise.prototype.finally] ---*/ -assert.sameValue(Promise.prototype.finally.name, 'finally'); - -verifyNotEnumerable(Promise.prototype.finally, 'name'); -verifyNotWritable(Promise.prototype.finally, 'name'); -verifyConfigurable(Promise.prototype.finally, 'name'); +verifyProperty(Promise.prototype.finally, "name", { + value: "finally", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Promise/prototype/finally/not-a-constructor.js b/js/src/tests/test262/built-ins/Promise/prototype/finally/not-a-constructor.js index 25bb9a6554..61ba99df53 100644 --- a/js/src/tests/test262/built-ins/Promise/prototype/finally/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Promise/prototype/finally/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { let p = new Promise(() => {}); new p.finally(); -}, '`let p = new Promise(() => {}); new p.finally()` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Promise/prototype/finally/rejected-observable-then-calls-argument.js b/js/src/tests/test262/built-ins/Promise/prototype/finally/rejected-observable-then-calls-argument.js index 4d183bf248..49cb4840ff 100644 --- a/js/src/tests/test262/built-ins/Promise/prototype/finally/rejected-observable-then-calls-argument.js +++ b/js/src/tests/test262/built-ins/Promise/prototype/finally/rejected-observable-then-calls-argument.js @@ -59,7 +59,7 @@ Promise.prototype.then = function(resolve, reject) { assert.sameValue(isConstructor(reject), false, 'isConstructor(reject) must return false'); assert.throws(TypeError, () => { new reject(); - }, '`new reject()` throws TypeError'); + }); assert.sameValue(arguments.length, 2, '`then` invoked with two arguments'); } diff --git a/js/src/tests/test262/built-ins/Promise/prototype/finally/resolved-observable-then-calls-argument.js b/js/src/tests/test262/built-ins/Promise/prototype/finally/resolved-observable-then-calls-argument.js index ab7eedb192..0f9fc558c5 100644 --- a/js/src/tests/test262/built-ins/Promise/prototype/finally/resolved-observable-then-calls-argument.js +++ b/js/src/tests/test262/built-ins/Promise/prototype/finally/resolved-observable-then-calls-argument.js @@ -35,7 +35,7 @@ Promise.prototype.then = function(resolve) { assert.sameValue(isConstructor(resolve), false, 'isConstructor(resolve) must return false'); assert.throws(TypeError, () => { new resolve(); - }, '`new resolve()` throws TypeError'); + }); assert.sameValue( resolve.length, diff --git a/js/src/tests/test262/built-ins/Promise/prototype/then/length.js b/js/src/tests/test262/built-ins/Promise/prototype/then/length.js index 1e865b0460..2ada466b80 100644 --- a/js/src/tests/test262/built-ins/Promise/prototype/then/length.js +++ b/js/src/tests/test262/built-ins/Promise/prototype/then/length.js @@ -18,10 +18,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Promise.prototype.then.length, 2); - -verifyNotEnumerable(Promise.prototype.then, 'length'); -verifyNotWritable(Promise.prototype.then, 'length'); -verifyConfigurable(Promise.prototype.then, 'length'); +verifyProperty(Promise.prototype.then, "length", { + value: 2, + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Promise/prototype/then/name.js b/js/src/tests/test262/built-ins/Promise/prototype/then/name.js index b1c97f9956..82402ea992 100644 --- a/js/src/tests/test262/built-ins/Promise/prototype/then/name.js +++ b/js/src/tests/test262/built-ins/Promise/prototype/then/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Promise.prototype.then.name, 'then'); - -verifyNotEnumerable(Promise.prototype.then, 'name'); -verifyNotWritable(Promise.prototype.then, 'name'); -verifyConfigurable(Promise.prototype.then, 'name'); +verifyProperty(Promise.prototype.then, "name", { + value: "then", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Promise/prototype/then/not-a-constructor.js b/js/src/tests/test262/built-ins/Promise/prototype/then/not-a-constructor.js index d943772f86..d04c89e111 100644 --- a/js/src/tests/test262/built-ins/Promise/prototype/then/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Promise/prototype/then/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { let p = new Promise(() => {}); new p.then(); -}, '`let p = new Promise(() => {}); new p.then()` throws TypeError'); +}); reportCompare(0, 0); |