You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jestSetup.js
const { server } = require('./src/app/mocks/api/server')
const AbortController = require('abort-controller')
const { fetch, Headers, Request, Response } = require('cross-fetch')
// 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())
global.fetch = fetch
global.Headers = Headers
global.Request = Request
global.Response = Response
global.AbortController = AbortController
The text was updated successfully, but these errors were encountered:
I'm trying to use a custom configuration for jest by running this command
react-scripts test -- --config=jest.config.js
The text was updated successfully, but these errors were encountered: