({ ok = true, body = {} } = {})
| 261 | } |
| 262 | |
| 263 | export function createFetchMock({ ok = true, body = {} } = {}) { |
| 264 | return vi.fn().mockResolvedValue( |
| 265 | Promise.resolve({ |
| 266 | ok, |
| 267 | json: () => Promise.resolve(body) |
| 268 | }) |
| 269 | ); |
| 270 | } |
| 271 | |
| 272 | /** |
| 273 | * Utility type to recursively replace `Date` with `string`. |
no outgoing calls
no test coverage detected