1
0
Ver Fonte

kernel: Promise existence checks.

Herbert Vojčík há 7 anos atrás
pai
commit
99028f5aaa
1 ficheiros alterados com 13 adições e 0 exclusões
  1. 13 0
      support/kernel-checks.js

+ 13 - 0
support/kernel-checks.js

@@ -46,4 +46,17 @@ define(function () {
                 return this;
             }).apply(true) === true;
     });
+    assert(function () {
+        return typeof Promise === "function";
+    });
+    assert(function () {
+        return typeof Promise.resolve === "function";
+    });
+    assert(function () {
+        return typeof Promise.reject === "function";
+    });
+    assert(function () {
+        return typeof new Promise(function () {
+            }).then === "function";
+    });
 });