diff options
Diffstat (limited to 'test/built-ins/Promise/prototype/then/ctor-access-count.js')
-rw-r--r-- | test/built-ins/Promise/prototype/then/ctor-access-count.js | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/test/built-ins/Promise/prototype/then/ctor-access-count.js b/test/built-ins/Promise/prototype/then/ctor-access-count.js index 585850ed9..51e00ad78 100644 --- a/test/built-ins/Promise/prototype/then/ctor-access-count.js +++ b/test/built-ins/Promise/prototype/then/ctor-access-count.js @@ -29,9 +29,7 @@ flags: [async] ---*/ var callCount = 0; -var prms = new Promise(function(resolve) { - resolve(); -}); +var prms = new Promise(function(resolve) { resolve(); }); Object.defineProperty(prms, 'constructor', { get: function() { callCount += 1; @@ -40,12 +38,12 @@ Object.defineProperty(prms, 'constructor', { }); prms.then(function() { - if (callCount !== 1) { - $DONE('Expected constructor access count: 1. Actual: ' + callCount); - return; - } + if (callCount !== 1) { + $DONE('Expected constructor access count: 1. Actual: ' + callCount); + return; + } - $DONE(); -}, function() { - $DONE('The promise should not be rejected.'); -}); + $DONE(); + }, function() { + $DONE('The promise should not be rejected.'); + }); |