diff options
Diffstat (limited to 'test/built-ins/Promise/prototype/then/resolve-settled-rejected-poisoned-then.js')
-rw-r--r-- | test/built-ins/Promise/prototype/then/resolve-settled-rejected-poisoned-then.js | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/test/built-ins/Promise/prototype/then/resolve-settled-rejected-poisoned-then.js b/test/built-ins/Promise/prototype/then/resolve-settled-rejected-poisoned-then.js index 6087049a9..a60f1b10c 100644 --- a/test/built-ins/Promise/prototype/then/resolve-settled-rejected-poisoned-then.js +++ b/test/built-ins/Promise/prototype/then/resolve-settled-rejected-poisoned-then.js @@ -36,20 +36,22 @@ var poisonedThen = Object.defineProperty({}, 'then', { throw value; } }); -var p1 = new Promise(function(_, reject) { reject(); }); +var p1 = new Promise(function(_, reject) { + reject(); +}); var p2; p2 = p1.then(function() {}, function() { - return poisonedThen; - }); + return poisonedThen; +}); p2.then(function(x) { - $DONE('The promise should not be fulfilled.'); - }, function(x) { - if (x !== value) { - $DONE('The promise should be rejected with the thrown exception.'); - return; - } + $DONE('The promise should not be fulfilled.'); +}, function(x) { + if (x !== value) { + $DONE('The promise should be rejected with the thrown exception.'); + return; + } - $DONE(); - }); + $DONE(); +}); |