grpc-tads6/node_modules/@protobufjs/fetch/tests/index.js

17 lines
410 B
JavaScript
Raw Normal View History

2024-06-06 00:46:09 +00:00
var tape = require("tape");
var fetch = require("..");
tape.test("fetch", function(test) {
if (typeof Promise !== "undefined") {
var promise = fetch("NOTFOUND");
promise.catch(function() {});
test.ok(promise instanceof Promise, "should return a promise if callback has been omitted");
}
// TODO - some way to test this properly?
test.end();
});