bito-code-review[bot] commented on PR #40781:
URL: https://github.com/apache/superset/pull/40781#issuecomment-4636337191
<!-- Bito Reply -->
The suggestion to reuse the `antd` reference is correct. Calling
`jest.requireActual('antd')` multiple times in the factory can lead to
redundant module resolution and potential inconsistencies. Storing the result
in a variable before the `jest.mock` call is a cleaner and more efficient
approach.
**superset-frontend/src/features/home/Menu.test.tsx**
```
const antd = jest.requireActual('antd');
jest.mock('antd', () => ({
...antd,
Grid: {
...antd.Grid,
useBreakpoint: () => mockUseBreakpoint(),
},
}));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]