summaryrefslogtreecommitdiff
path: root/frontend-old/node_modules/@protobufjs/fetch/tests/index.js
blob: 3cb0daebff36f90d3356b878a23a03eceab9ed46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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();
});