mirror of
https://github.com/callstack/react-native-testing-library.git
synced 2026-09-18 23:09:04 +08:00
11 lines
346 B
TypeScript
11 lines
346 B
TypeScript
import { server } from './app/network-requests/__tests__/test-utils';
|
|
|
|
// Enable API mocking via Mock Service Worker (MSW)
|
|
beforeAll(() => server.listen());
|
|
|
|
// Reset any runtime request handlers we may add during the tests
|
|
afterEach(() => server.resetHandlers());
|
|
|
|
// Disable API mocking after the tests are done
|
|
afterAll(() => server.close());
|