Created
September 26, 2022 13:22
-
-
Save marta-pinkowska/81673bda4122af5fe207230af46dd2ad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/setupTests.js | |
import { server } from './mocks/server.js' | |
// Establish API mocking before all tests. | |
beforeAll(() => server.listen()) | |
// Reset any request handlers that we may add during the tests, | |
// so they don't affect other tests. | |
afterEach(() => server.resetHandlers()) | |
// Clean up after the tests are finished. | |
afterAll(() => server.close()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment