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, 14 insertions, 16 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 3936c9700..bc292a8c4 100644 --- a/test/built-ins/Promise/resolve-prms-cstm-then-immed.js +++ b/test/built-ins/Promise/resolve-prms-cstm-then-immed.js @@ -27,9 +27,7 @@ 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); @@ -46,16 +44,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.'); + }); |