From 576c81e41be1cae94d85ccfc955aaf86afc80f3d Mon Sep 17 00:00:00 2001 From: Andrew Leedham Date: Tue, 19 Mar 2019 16:16:37 +0000 Subject: [PATCH] test(node-fetch): added FetchError test --- types/node-fetch/node-fetch-tests.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/types/node-fetch/node-fetch-tests.ts b/types/node-fetch/node-fetch-tests.ts index d35114f60a..165ac24800 100644 --- a/types/node-fetch/node-fetch-tests.ts +++ b/types/node-fetch/node-fetch-tests.ts @@ -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'); +}