React Testing Library
Oct 12, 2021 · 1 min read · To Mock an api import {checkStatus} from '../api' jest.mock('../api') test( 'this is...' ,() =>{ checkStatus.mockResolvedValue({'Resolved value'}) }) To Mock Timers beforeAll(() => { // we're using fake timers because we don't want to // wait ...
Join discussion