Comparing version 0.4.0 to 0.4.1
@@ -1,4 +0,4 @@ | ||
export { A as AwaitedMockValue, H as HeadersMockInit, M as Method, i as MockValue, j as Mocks, f as createMockFetch, a as mockDelete, m as mockFetch, b as mockGet, c as mockPatch, d as mockPost, e as mockPut, p as prepareFetch } from './api-3d48acc0'; | ||
export { A as AwaitedMockValue, H as HeadersMockInit, M as Method, i as MockValue, j as Mocks, f as createMockFetch, a as mockDelete, m as mockFetch, b as mockGet, c as mockPatch, d as mockPost, e as mockPut, p as prepareFetch } from './api-5ea64eba'; | ||
import 'tinyspy'; | ||
import './headers'; | ||
import './response'; |
@@ -159,9 +159,12 @@ import { | ||
}; | ||
const createAlias2 = (method) => { | ||
return mockFetch2.bind(mockFetch2, method); | ||
}; | ||
return { | ||
mockFetch: mockFetch2, | ||
mockGet: mockFetch2.bind(mockFetch2, "GET"), | ||
mockPost: mockFetch2.bind(mockFetch2, "POST"), | ||
mockPatch: mockFetch2.bind(mockFetch2, "PATCH"), | ||
mockDelete: mockFetch2.bind(mockFetch2, "DELETE"), | ||
mockPut: mockFetch2.bind(mockFetch2, "PUT") | ||
mockGet: createAlias2("GET"), | ||
mockPost: createAlias2("POST"), | ||
mockPatch: createAlias2("PATCH"), | ||
mockDelete: createAlias2("DELETE"), | ||
mockPut: createAlias2("PUT") | ||
}; | ||
@@ -168,0 +171,0 @@ } |
export { declareFetchAssertions } from './extend'; | ||
export { f as createMockApi, a as mockDelete, m as mockFetch, b as mockGet, c as mockPatch, d as mockPost, e as mockPut, p as prepareFetch } from './api-3d48acc0'; | ||
export { f as createMockApi, a as mockDelete, m as mockFetch, b as mockGet, c as mockPatch, d as mockPost, e as mockPut, p as prepareFetch } from './api-5ea64eba'; | ||
import 'tinyspy'; | ||
import './headers'; | ||
import './response'; |
@@ -1,2 +0,2 @@ | ||
import { F as FetchSpyInstance } from './api-3d48acc0'; | ||
import { F as FetchSpyInstance } from './api-5ea64eba'; | ||
import 'tinyspy'; | ||
@@ -3,0 +3,0 @@ import './headers'; |
import 'tinyspy'; | ||
export { g as FetchArgs, h as FetchMockInstance, F as FetchSpyInstance } from './api-3d48acc0'; | ||
export { g as FetchArgs, h as FetchMockInstance, F as FetchSpyInstance } from './api-5ea64eba'; | ||
import './headers'; | ||
import './response'; |
{ | ||
"name": "vi-fetch", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "Easiest way to mock fetch", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
1110
36252