mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-02 03:25:56 +01:00
8 lines
274 B
JavaScript
8 lines
274 B
JavaScript
|
|
jest.mock("react-i18next", () => ({
|
||
|
|
// this mock makes sure any components using the translate HoC receive the t function as a prop
|
||
|
|
translate: () => Component => {
|
||
|
|
Component.defaultProps = { ...Component.defaultProps, t: key => key };
|
||
|
|
return Component;
|
||
|
|
}
|
||
|
|
}));
|