diff options
Diffstat (limited to 'test/built-ins/Promise/prototype/then/resolve-settled-rejected-non-thenable.js')
-rw-r--r-- | test/built-ins/Promise/prototype/then/resolve-settled-rejected-non-thenable.js | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/test/built-ins/Promise/prototype/then/resolve-settled-rejected-non-thenable.js b/test/built-ins/Promise/prototype/then/resolve-settled-rejected-non-thenable.js index 8e4b424fd..13e72aba0 100644 --- a/test/built-ins/Promise/prototype/then/resolve-settled-rejected-non-thenable.js +++ b/test/built-ins/Promise/prototype/then/resolve-settled-rejected-non-thenable.js @@ -33,21 +33,25 @@ info: | flags: [async] ---*/ -var nonThenable = { then: null }; -var p1 = new Promise(function(_, reject) { reject(); }); +var nonThenable = { + then: null +}; +var p1 = new Promise(function(_, reject) { + reject(); +}); var p2; p2 = p1.then(function() {}, function() { - return nonThenable; - }); + return nonThenable; +}); p2.then(function(value) { - if (value !== nonThenable) { - $DONE('The promise should be fulfilled with the provided value.'); - return; - } + if (value !== nonThenable) { + $DONE('The promise should be fulfilled with the provided value.'); + return; + } - $DONE(); - }, function() { - $DONE('The promise should not be rejected.'); - }); + $DONE(); +}, function() { + $DONE('The promise should not be rejected.'); +}); |