summaryrefslogtreecommitdiff
path: root/test/built-ins/Promise/prototype/then/reject-pending-rejected.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Promise/prototype/then/reject-pending-rejected.js')
-rw-r--r--test/built-ins/Promise/prototype/then/reject-pending-rejected.js28
1 files changed, 16 insertions, 12 deletions
diff --git a/test/built-ins/Promise/prototype/then/reject-pending-rejected.js b/test/built-ins/Promise/prototype/then/reject-pending-rejected.js
index 7d881d19e..03ff2902b 100644
--- a/test/built-ins/Promise/prototype/then/reject-pending-rejected.js
+++ b/test/built-ins/Promise/prototype/then/reject-pending-rejected.js
@@ -23,23 +23,27 @@ flags: [async]
---*/
var reject;
-var thenable = new Promise(function(resolve) { resolve(); });
-var p1 = new Promise(function(_, _reject) { reject = _reject; });
+var thenable = new Promise(function(resolve) {
+ resolve();
+});
+var p1 = new Promise(function(_, _reject) {
+ reject = _reject;
+});
var p2;
p2 = p1.then(function() {}, function() {
- throw thenable;
- });
+ throw thenable;
+});
p2.then(function() {
- $DONE('The promise should not be fulfilled.');
- }, function(x) {
- if (x !== thenable) {
- $DONE('The promise should be rejected with the resolution value of the provided promise.');
- return;
- }
+ $DONE('The promise should not be fulfilled.');
+}, function(x) {
+ if (x !== thenable) {
+ $DONE('The promise should be rejected with the resolution value of the provided promise.');
+ return;
+ }
- $DONE();
- });
+ $DONE();
+});
reject();