mirror of
https://github.com/callstack/react-native-testing-library.git
synced 2026-09-18 23:09:04 +08:00
96ea646a92
* chore: Expo 52 preview 3 * chore: update to preview 13 * chore: update expo in examples
17 lines
531 B
TypeScript
17 lines
531 B
TypeScript
import { configure } from '@testing-library/react-native';
|
|
|
|
// Import built-in Jest matchers
|
|
import '@testing-library/react-native/extend-expect';
|
|
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());
|
|
|
|
configure({ concurrentRoot: true });
|