summaryrefslogtreecommitdiff
path: root/test/built-ins/Promise/all/resolve-element-function-nonconstructor.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Promise/all/resolve-element-function-nonconstructor.js')
-rw-r--r--test/built-ins/Promise/all/resolve-element-function-nonconstructor.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/built-ins/Promise/all/resolve-element-function-nonconstructor.js b/test/built-ins/Promise/all/resolve-element-function-nonconstructor.js
index 4c329a4b0..7da037347 100644
--- a/test/built-ins/Promise/all/resolve-element-function-nonconstructor.js
+++ b/test/built-ins/Promise/all/resolve-element-function-nonconstructor.js
@@ -17,11 +17,16 @@ var thenable = {
resolveElementFunction = fulfill;
}
};
+
function NotPromise(executor) {
- executor(function(){}, function(){});
+ executor(function() {}, function() {});
}
-NotPromise.resolve = function(v) { return v; };
+NotPromise.resolve = function(v) {
+ return v;
+};
Promise.all.call(NotPromise, [thenable]);
assert.sameValue(Object.prototype.hasOwnProperty.call(resolveElementFunction, "prototype"), false);
-assert.throws(TypeError, function() { new resolveElementFunction(); });
+assert.throws(TypeError, function() {
+ new resolveElementFunction();
+});