暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516
  1. var tape = require("tape");
  2. var fetch = require("..");
  3. tape.test("fetch", function(test) {
  4. if (typeof Promise !== "undefined") {
  5. var promise = fetch("NOTFOUND");
  6. promise.catch(function() {});
  7. test.ok(promise instanceof Promise, "should return a promise if callback has been omitted");
  8. }
  9. // TODO - some way to test this properly?
  10. test.end();
  11. });