1
0
Преглед на файлове

kernel: Promise existence checks.

Herbert Vojčík преди 7 години
родител
ревизия
99028f5aaa
променени са 1 файла, в които са добавени 13 реда и са изтрити 0 реда
  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";
+    });
 });