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
|
// Also mock the act function from react-dom/test-utils
|
||||||
const { act } = require('react-dom/test-utils');
|
// This is handled by Jest's module resolution
|
||||||
if (act) {
|
|
||||||
global.act = act;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mock react-responsive-masonry
|
// Mock react-responsive-masonry
|
||||||
|
|||||||
Reference in New Issue
Block a user