Sfoglia il codice sorgente

kernel: Promise existence checks.

Herbert Vojčík 7 anni fa
parent
commit
99028f5aaa
1 ha cambiato i file con 13 aggiunte e 0 eliminazioni
  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";
+    });
 });