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