blob: d37bfb6842a93bdaba650f495c0109eab0f2853d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
/*---
includes: [compareArray.js]
flags: [async]
---*/
let stages = [];
var promise = new Promise((resolve, reject) => resolve('all'));
promise.then( function f1(result) {
stages.push('S: ' + result);
return 'f1';
});
promise.then( function f2(result) {
stages.push('R: ' + result);
return 'f2';
})
.then(() => assert.compareArray(stages, ['end', 'S: all', 'R: all']))
.then($DONE, $DONE);
stages.push('end');
|