mirror of https://github.com/tc39/test262.git
Improve "name" tests of Promise built-in functions (#2179)
This commit is contained in:
parent
7c7d3f756c
commit
d7c95efe66
|
@ -2,7 +2,7 @@
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
es6id: 25.4.4.1.2
|
esid: sec-promise.all-resolve-element-functions
|
||||||
description: The `name` property of Promise.all Resolve Element functions
|
description: The `name` property of Promise.all Resolve Element functions
|
||||||
info: |
|
info: |
|
||||||
A promise resolve function is an anonymous built-in function.
|
A promise resolve function is an anonymous built-in function.
|
||||||
|
@ -29,3 +29,4 @@ NotPromise.resolve = function(v) {
|
||||||
Promise.all.call(NotPromise, [thenable]);
|
Promise.all.call(NotPromise, [thenable]);
|
||||||
|
|
||||||
assert.sameValue(Object.prototype.hasOwnProperty.call(resolveElementFunction, "name"), false);
|
assert.sameValue(Object.prototype.hasOwnProperty.call(resolveElementFunction, "name"), false);
|
||||||
|
assert.sameValue(resolveElementFunction.name, "");
|
||||||
|
|
|
@ -30,3 +30,4 @@ NotPromise.resolve = function(v) {
|
||||||
Promise.allSettled.call(NotPromise, [thenable]);
|
Promise.allSettled.call(NotPromise, [thenable]);
|
||||||
|
|
||||||
assert.sameValue(Object.prototype.hasOwnProperty.call(rejectElementFunction, 'name'), false);
|
assert.sameValue(Object.prototype.hasOwnProperty.call(rejectElementFunction, 'name'), false);
|
||||||
|
assert.sameValue(rejectElementFunction.name, '');
|
||||||
|
|
|
@ -33,3 +33,4 @@ assert.sameValue(
|
||||||
Object.prototype.hasOwnProperty.call(resolveElementFunction, 'name'),
|
Object.prototype.hasOwnProperty.call(resolveElementFunction, 'name'),
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
assert.sameValue(resolveElementFunction.name, '');
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
es6id: 25.4.1.5.1
|
esid: sec-getcapabilitiesexecutor-functions
|
||||||
description: The `name` property of GetCapabilitiesExecutor functions
|
description: The `name` property of GetCapabilitiesExecutor functions
|
||||||
info: |
|
info: |
|
||||||
A GetCapabilitiesExecutor function is an anonymous built-in function.
|
A GetCapabilitiesExecutor function is an anonymous built-in function.
|
||||||
|
@ -22,3 +22,4 @@ function NotPromise(executor) {
|
||||||
Promise.resolve.call(NotPromise);
|
Promise.resolve.call(NotPromise);
|
||||||
|
|
||||||
assert.sameValue(Object.prototype.hasOwnProperty.call(executorFunction, "name"), false);
|
assert.sameValue(Object.prototype.hasOwnProperty.call(executorFunction, "name"), false);
|
||||||
|
assert.sameValue(executorFunction.name, "");
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
es6id: 25.4.1.3.1
|
esid: sec-promise-reject-functions
|
||||||
description: The `name` property of Promise Reject functions
|
description: The `name` property of Promise Reject functions
|
||||||
info: |
|
info: |
|
||||||
A promise reject function is an anonymous built-in function.
|
A promise reject function is an anonymous built-in function.
|
||||||
|
@ -19,3 +19,4 @@ new Promise(function(resolve, reject) {
|
||||||
});
|
});
|
||||||
|
|
||||||
assert.sameValue(Object.prototype.hasOwnProperty.call(rejectFunction, "name"), false);
|
assert.sameValue(Object.prototype.hasOwnProperty.call(rejectFunction, "name"), false);
|
||||||
|
assert.sameValue(rejectFunction.name, "");
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
es6id: 25.4.1.3.2
|
esid: sec-promise-resolve-functions
|
||||||
description: The `name` property of Promise Resolve functions
|
description: The `name` property of Promise Resolve functions
|
||||||
info: |
|
info: |
|
||||||
A promise resolve function is an anonymous built-in function.
|
A promise resolve function is an anonymous built-in function.
|
||||||
|
@ -19,3 +19,4 @@ new Promise(function(resolve, reject) {
|
||||||
});
|
});
|
||||||
|
|
||||||
assert.sameValue(Object.prototype.hasOwnProperty.call(resolveFunction, "name"), false);
|
assert.sameValue(Object.prototype.hasOwnProperty.call(resolveFunction, "name"), false);
|
||||||
|
assert.sameValue(resolveFunction.name, "");
|
||||||
|
|
Loading…
Reference in New Issue