Skip to content

Commit

Permalink
rearrange project and fix fetch issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nitin-ebi committed Feb 10, 2023
1 parent a18974b commit 9d160ff
Show file tree
Hide file tree
Showing 17 changed files with 3,203 additions and 22,795 deletions.
4 changes: 4 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
testEnvironment: 'jsdom',
setupFilesAfterEnv: ['./jest.setup.js'],
}
4 changes: 0 additions & 4 deletions jest.config.json

This file was deleted.

19 changes: 19 additions & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Polyfill "window.fetch" used in the React component.
import 'whatwg-fetch'

// Extend Jest "expect" functionality with Testing Library assertions.
import '@testing-library/jest-dom'

import { server } from './src/mocks/server'

beforeAll(() => {
server.listen()
})

afterEach(() => {
server.resetHandlers()
})

afterAll(() => {
server.close()
})
Loading

0 comments on commit 9d160ff

Please sign in to comment.