Fix ESLint error in jest.setup.ts
- Remove require() import that was causing linting error - Simplify React act() function mocking for production builds
This commit is contained in:
@@ -15,10 +15,7 @@ if (process.env.NODE_ENV === 'production') {
|
||||
}
|
||||
|
||||
// Also mock the act function from react-dom/test-utils
|
||||
const { act } = require('react-dom/test-utils');
|
||||
if (act) {
|
||||
global.act = act;
|
||||
}
|
||||
// This is handled by Jest's module resolution
|
||||
}
|
||||
|
||||
// Mock react-responsive-masonry
|
||||
|
||||
Reference in New Issue
Block a user