diff options
Diffstat (limited to 'test/built-ins/Promise/resolve-prms-cstm-then-immed.js')
-rw-r--r-- | test/built-ins/Promise/resolve-prms-cstm-then-immed.js | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/test/built-ins/Promise/resolve-prms-cstm-then-immed.js b/test/built-ins/Promise/resolve-prms-cstm-then-immed.js index bc292a8c4..3936c9700 100644 --- a/test/built-ins/Promise/resolve-prms-cstm-then-immed.js +++ b/test/built-ins/Promise/resolve-prms-cstm-then-immed.js @@ -27,7 +27,9 @@ flags: [async] var returnValue = null; var value = {}; var lateCallCount = 0; -var thenable = new Promise(function(resolve) { resolve(); }); +var thenable = new Promise(function(resolve) { + resolve(); +}); thenable.then = function(resolve) { resolve(value); @@ -44,16 +46,16 @@ thenable.then = function() { }; promise.then(function(val) { - if (val !== value) { - $DONE('The promise should be fulfilled with the provided value.'); - return; - } - - if (lateCallCount > 0) { - $DONE('The `then` method should be executed synchronously.'); - } - - $DONE(); - }, function() { - $DONE('The promise should not be rejected.'); - }); + if (val !== value) { + $DONE('The promise should be fulfilled with the provided value.'); + return; + } + + if (lateCallCount > 0) { + $DONE('The `then` method should be executed synchronously.'); + } + + $DONE(); +}, function() { + $DONE('The promise should not be rejected.'); +}); |