Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add jest dependency and remove extra configs from jest.config.js #4146

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 2 additions & 26 deletions jest.config.js
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'],
};
3 changes: 0 additions & 3 deletions jest.setup.js

This file was deleted.

Loading
Loading