-
Notifications
You must be signed in to change notification settings - Fork 890
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add
jest
dependency and remove extra configs from `jest.config…
….js` (#4146) * fix/test: remove unnecessay configurations * chore: install and configure jest * chore: delete setup file as we don't need it initially
- Loading branch information
1 parent
3b92197
commit 8be6d50
Showing
4 changed files
with
6,658 additions
and
2,932 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,5 @@ | ||
module.exports = { | ||
// Use jsdom to simulate a browser environment | ||
testEnvironment: 'jest-environment-jsdom', | ||
|
||
// Specify where Jest should look for test files | ||
testMatch: ['**/?(*.)+(spec|test).[jt]s?(x)'], | ||
|
||
// Transform JavaScript files using Babel (if needed) | ||
transform: { | ||
'^.+\\.jsx?$': 'babel-jest', | ||
}, | ||
|
||
// Clear mocks between tests for isolation | ||
testMatch: ['**/__tests__/**/*.test.js', '**/?(*.)+(spec|test).[jt]s?(x)'], | ||
clearMocks: true, | ||
|
||
// Collect coverage information and specify the directory | ||
collectCoverage: true, | ||
coverageDirectory: 'coverage', | ||
|
||
// Specify file extensions Jest will process | ||
moduleFileExtensions: ['js', 'jsx', 'json', 'node'], | ||
|
||
// Define any global variables for the tests | ||
globals: { | ||
'window': {}, | ||
}, | ||
// Set up files to run before tests (e.g., polyfills, setup scripts) | ||
setupFiles: ['./jest.setup.js'], // Optional, if you have a setup file | ||
moduleFileExtensions: ['js', 'json', 'node'], | ||
}; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.