Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
jajbshjahavahh
GitHub Repository: jajbshjahavahh/Gojo-Satoru
Path: blob/master/node_modules/@protobufjs/fetch/tests/index.js
3918 views
1
var tape = require("tape");
2
3
var fetch = require("..");
4
5
tape.test("fetch", function(test) {
6
7
if (typeof Promise !== "undefined") {
8
var promise = fetch("NOTFOUND");
9
promise.catch(function() {});
10
test.ok(promise instanceof Promise, "should return a promise if callback has been omitted");
11
}
12
13
// TODO - some way to test this properly?
14
15
test.end();
16
});
17
18