Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / grpc-cloned / node_modules / @protobufjs / fetch / tests / index.js
diff --git a/legacy-libs/grpc-cloned/node_modules/@protobufjs/fetch/tests/index.js b/legacy-libs/grpc-cloned/node_modules/@protobufjs/fetch/tests/index.js
new file mode 100644 (file)
index 0000000..3cb0dae
--- /dev/null
@@ -0,0 +1,16 @@
+var tape = require("tape");\r
+\r
+var fetch = require("..");\r
+\r
+tape.test("fetch", function(test) {\r
+\r
+    if (typeof Promise !== "undefined") {\r
+        var promise = fetch("NOTFOUND");\r
+        promise.catch(function() {});\r
+        test.ok(promise instanceof Promise, "should return a promise if callback has been omitted");\r
+    }\r
+\r
+    // TODO - some way to test this properly?\r
+    \r
+    test.end();\r
+});\r