diff options
Diffstat (limited to 'test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-poisoned-then.js')
-rw-r--r-- | test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-poisoned-then.js | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-poisoned-then.js b/test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-poisoned-then.js index bf5912812..7b2147f4d 100644 --- a/test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-poisoned-then.js +++ b/test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-poisoned-then.js @@ -30,24 +30,22 @@ var poisonedThen = Object.defineProperty({}, 'then', { throw value; } }); -var p1 = new Promise(function(_resolve) { - resolve = _resolve; -}); +var p1 = new Promise(function(_resolve) { resolve = _resolve; }); var p2; p2 = p1.then(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(); + }); resolve(); |