summaryrefslogtreecommitdiff
path: root/test/built-ins/Promise/prototype/then/resolve-pending-rejected-non-obj.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Promise/prototype/then/resolve-pending-rejected-non-obj.js')
-rw-r--r--test/built-ins/Promise/prototype/then/resolve-pending-rejected-non-obj.js24
1 files changed, 13 insertions, 11 deletions
diff --git a/test/built-ins/Promise/prototype/then/resolve-pending-rejected-non-obj.js b/test/built-ins/Promise/prototype/then/resolve-pending-rejected-non-obj.js
index 27ba9746f..01f09f241 100644
--- a/test/built-ins/Promise/prototype/then/resolve-pending-rejected-non-obj.js
+++ b/test/built-ins/Promise/prototype/then/resolve-pending-rejected-non-obj.js
@@ -23,22 +23,24 @@ flags: [async]
---*/
var reject;
-var p1 = new Promise(function(_, _reject) { reject = _reject; });
+var p1 = new Promise(function(_, _reject) {
+ reject = _reject;
+});
var p2;
p2 = p1.then(function() {}, function() {
- return 23;
- });
+ return 23;
+});
p2.then(function(value) {
- if (value !== 23) {
- $DONE('The promise should be fulfilled with the provided value.');
- return;
- }
+ if (value !== 23) {
+ $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.');
+});
reject();