mirror of https://github.com/tc39/test262.git
Promise: use .then($DONE, $DONE) wherever possible
This commit is contained in:
parent
040eb5393a
commit
2f12ab71f8
|
@ -39,5 +39,5 @@ Promise.all.call(Custom, values)
|
|||
.then(() => {
|
||||
assert.sameValue(presolveCallCount, 0, '`Promise.resolve` is never invoked');
|
||||
assert.sameValue(cresolveCallCount, 3, '`Custom.resolve` invoked once for every iterated promise');
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
}).then($DONE, $DONE);
|
||||
|
||||
|
|
|
@ -30,5 +30,5 @@ Promise.resolve = function(...args) {
|
|||
Promise.all(values)
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 3, '`then` invoked once for every iterated promise');
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
}).then($DONE, $DONE);
|
||||
|
||||
|
|
|
@ -30,5 +30,5 @@ Promise.resolve = function(...args) {
|
|||
Promise.all(values)
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 3, '`Promise.resolve` invoked once for every iterated value');
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
}).then($DONE, $DONE);
|
||||
|
||||
|
|
|
@ -39,5 +39,5 @@ Promise.allSettled.call(Custom, values)
|
|||
.then(() => {
|
||||
assert.sameValue(presolveCallCount, 0, '`Promise.resolve` is never invoked');
|
||||
assert.sameValue(cresolveCallCount, 3, '`Custom.resolve` invoked once for every iterated promise');
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
}).then($DONE, $DONE);
|
||||
|
||||
|
|
|
@ -30,5 +30,5 @@ Promise.resolve = function(...args) {
|
|||
Promise.allSettled(values)
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 3, '`then` invoked once for every iterated promise');
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
}).then($DONE, $DONE);
|
||||
|
||||
|
|
|
@ -30,5 +30,5 @@ Promise.resolve = function(...args) {
|
|||
Promise.allSettled(values)
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 3, '`Promise.resolve` invoked once for every iterated value');
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
}).then($DONE, $DONE);
|
||||
|
||||
|
|
|
@ -39,5 +39,5 @@ Promise.any.call(Custom, values)
|
|||
.then(() => {
|
||||
assert.sameValue(presolveCallCount, 0, '`Promise.resolve` is never invoked');
|
||||
assert.sameValue(cresolveCallCount, 3, '`Custom.resolve` invoked once for every iterated promise');
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
}).then($DONE, $DONE);
|
||||
|
||||
|
|
|
@ -30,5 +30,5 @@ Promise.resolve = function(...args) {
|
|||
Promise.any(values)
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 3, '`then` invoked once for every iterated promise');
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
}).then($DONE, $DONE);
|
||||
|
||||
|
|
|
@ -39,5 +39,5 @@ Promise.any.call(Custom, values)
|
|||
.then(() => {
|
||||
assert.sameValue(presolveCallCount, 0, '`Promise.resolve` is never invoked');
|
||||
assert.sameValue(cresolveCallCount, 3, '`Custom.resolve` invoked once for every iterated promise');
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
}).then($DONE, $DONE);
|
||||
|
||||
|
|
|
@ -30,5 +30,5 @@ Promise.resolve = function(...args) {
|
|||
Promise.any(values)
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 3, '`Promise.resolve` invoked once for every iterated value');
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
}).then($DONE, $DONE);
|
||||
|
||||
|
|
|
@ -38,4 +38,4 @@ promises.forEach(promise => {
|
|||
Promise.any(promises)
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 3, '`then` invoked once for every iterated value');
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
}).then($DONE, $DONE);
|
||||
|
|
|
@ -39,5 +39,5 @@ Promise.race.call(Custom, values)
|
|||
.then(() => {
|
||||
assert.sameValue(presolveCallCount, 0, '`Promise.resolve` is never invoked');
|
||||
assert.sameValue(cresolveCallCount, 3, '`Custom.resolve` invoked once for every item in iterable arg');
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
}).then($DONE, $DONE);
|
||||
|
||||
|
|
|
@ -30,5 +30,5 @@ Promise.resolve = function(...args) {
|
|||
Promise.race(values)
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 3, '`then` invoked once for every item in iterable arg');
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
}).then($DONE, $DONE);
|
||||
|
||||
|
|
|
@ -30,5 +30,5 @@ Promise.resolve = function(...args) {
|
|||
Promise.race(values)
|
||||
.then(() => {
|
||||
assert.sameValue(callCount, 3, '`Promise.resolve` invoked once for every item in iterable arg');
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
}).then($DONE, $DONE);
|
||||
|
||||
|
|
Loading…
Reference in New Issue