test(node-fetch): added FetchError test

This commit is contained in:
Andrew Leedham
2019-03-19 16:42:56 +00:00
parent 9e9949c5b0
commit 576c81e41b
+6 -1
View File
@@ -1,4 +1,4 @@
import fetch, { Headers, Request, RequestInit, Response } from 'node-fetch';
import fetch, { Headers, Request, RequestInit, Response, FetchError } from 'node-fetch';
import { Agent } from "http";
function test_fetchUrlWithOptions() {
@@ -82,3 +82,8 @@ function test_isRedirect() {
fetch.isRedirect(301);
fetch.isRedirect(201);
}
function test_FetchError() {
new FetchError('message', 'type', 'systemError');
new FetchError('message', 'type');
}