@types/fetch-mock
Advanced tools
Comparing version 6.0.2 to 6.0.3
@@ -207,2 +207,10 @@ // Type definitions for fetch-mock 6.0 | ||
/** | ||
* Returns a drop-in mock for fetch which can be passed to other mocking | ||
* libraries. It implements the full fetch-mock api and maintains its | ||
* own state independent of other instances, so tests can be run in | ||
* parallel. | ||
*/ | ||
sandbox(): FetchMockSandbox; | ||
/** | ||
* Replaces fetch() with a stub which records its calls, grouped by | ||
@@ -454,2 +462,10 @@ * route, and optionally returns a mocked Response object or passes the | ||
} | ||
interface FetchMockSandbox extends FetchMockStatic { | ||
/** | ||
* Also callable as fetch(). Use `typeof fetch` in your code to define | ||
* a field that accepts both `fetch()` and a fetch-mock sandbox. | ||
*/ | ||
(input?: string | Request , init?: RequestInit): Promise<Response>; | ||
} | ||
} | ||
@@ -456,0 +472,0 @@ |
{ | ||
"name": "@types/fetch-mock", | ||
"version": "6.0.2", | ||
"version": "6.0.3", | ||
"description": "TypeScript definitions for fetch-mock", | ||
@@ -45,4 +45,4 @@ "license": "MIT", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "56d46f4b8d25e955aad8db25eaa2e3bb94409693caf542b19a395177cda1ba8c", | ||
"typesPublisherContentHash": "24ae9d9afff3274bcd4deb351309da72669c1d6c223e6905101c073cec24abae", | ||
"typeScriptVersion": "2.2" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Sun, 27 May 2018 14:13:13 GMT | ||
* Last updated: Wed, 30 May 2018 01:28:45 GMT | ||
* Dependencies: none | ||
@@ -14,0 +14,0 @@ * Global values: none |
23861
414