UNPKG

@pinkairship/use-data-fetch

Version:

A data fetch hook that stays out of your way.

19 lines (16 loc) 481 B
import React from 'react' import { render as baseRender } from '@testing-library/react' import '@testing-library/jest-dom' import { DataFetchProvider } from '../src/contexts/data-fetch-provider' import { makeMockAxios } from '../example/App' export function render(ui, props = {}, renderOptions = {}) { return baseRender( <DataFetchProvider makeMockDataFetchInstance={makeMockAxios} {...props} > {ui} </DataFetchProvider>, renderOptions ) }