summaryrefslogtreecommitdiff
path: root/test/built-ins/Promise/race/resolve-self.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Promise/race/resolve-self.js')
-rw-r--r--test/built-ins/Promise/race/resolve-self.js28
1 files changed, 13 insertions, 15 deletions
diff --git a/test/built-ins/Promise/race/resolve-self.js b/test/built-ins/Promise/race/resolve-self.js
index 565bc94e5..6fc2a3820 100644
--- a/test/built-ins/Promise/race/resolve-self.js
+++ b/test/built-ins/Promise/race/resolve-self.js
@@ -33,9 +33,7 @@ var thenable = {
};
try {
- Promise.resolve = function(v) {
- return v;
- };
+ Promise.resolve = function(v) { return v; };
self = Promise.race([thenable]);
} finally {
Promise.resolve = builtinResolve;
@@ -44,15 +42,15 @@ try {
resolve(self);
self.then(function() {
- $DONE('The promise should not be fulfilled.');
-}, function(value) {
- if (!value) {
- $DONE('The promise should be rejected with a value.');
- return;
- }
- if (value.constructor !== TypeError) {
- $DONE('The promise should be rejected with a TypeError instance.');
- return;
- }
- $DONE();
-});
+ $DONE('The promise should not be fulfilled.');
+ }, function(value) {
+ if (!value) {
+ $DONE('The promise should be rejected with a value.');
+ return;
+ }
+ if (value.constructor !== TypeError) {
+ $DONE('The promise should be rejected with a TypeError instance.');
+ return;
+ }
+ $DONE();
+ });