You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
394 B
17 lines
394 B
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();
|
|
});
|