Browse Source

kernel: Promise existence checks.

Herbert Vojčík 7 years ago
parent
commit
99028f5aaa
1 changed files with 13 additions and 0 deletions
  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";
+    });
 });