diff options
Diffstat (limited to 'test/built-ins/Promise/prototype/finally/resolved-observable-then-calls.js')
-rw-r--r-- | test/built-ins/Promise/prototype/finally/resolved-observable-then-calls.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/test/built-ins/Promise/prototype/finally/resolved-observable-then-calls.js b/test/built-ins/Promise/prototype/finally/resolved-observable-then-calls.js index 1fb248ac9..6e583527c 100644 --- a/test/built-ins/Promise/prototype/finally/resolved-observable-then-calls.js +++ b/test/built-ins/Promise/prototype/finally/resolved-observable-then-calls.js @@ -11,29 +11,30 @@ includes: [promiseHelper.js] var sequence = []; var yesValue = {}; var yes = Promise.resolve(yesValue); -yes.then = function() { +yes.then = function () { sequence.push(1); return Promise.prototype.then.apply(this, arguments); }; var noReason = {}; var no = Promise.reject(noReason); -no.then = function() { +no.then = function () { sequence.push(4); return Promise.prototype.then.apply(this, arguments); }; -yes.then(function(x) { +yes.then(function (x) { sequence.push(2); assert.sameValue(x, yesValue); return x; -}).finally(function() { +}).finally(function () { sequence.push(3); return no; -}).catch(function(e) { +}).catch(function (e) { sequence.push(5); assert.sameValue(e, noReason); -}).then(function() { +}).then(function () { checkSequence(sequence, "All expected callbacks called in correct order"); $DONE(); }).catch($ERROR); + |