blob: a3e155f3c9fa82fd2e76741d31af21b4f9ac1481 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/*---
includes: [compareArray.js]
flags: [async]
---*/
let stages = [];
var promise = new Promise(function(resolve, reject) {
stages.push('One');
reject('Oh no');
});
stages.push('Two');
promise.then(() => {stages.push('Three')})
.catch((v) => {stages.push(v)})
.then(() => assert.compareArray(stages, ['One', 'Two', 'Three', 'Oh no']))
.then($DONE, $DONE);
stages.push('Three');
|