blob: fe4bb017f36ea0834e670f46f5e3e70a2f3ca28c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/*---
includes: []
flags: [async]
---*/
let called = false;
var thenable = Promise.resolve();
var p = new Promise(function(a,b) {
throw thenable;
});
p
.then(v => $DONOTEVALUATE())
.then(
v => $DONOTEVALUATE(),
function(x) {
assert.sameValue(x, thenable, 'The promise should be rejected with the resolution value.');
called = true;
}
)
.then(() => assert.sameValue(called, true))
.then($DONE, $DONE);
|