Files
SCM-Manager/scm-ui/ui-tests/i18n.ts

11 lines
307 B
TypeScript
Raw Normal View History

jest.mock("react-i18next", () => ({
// this mock makes sure any components using the translate HoC receive the t function as a prop
translate: () => (Component: any) => {
Component.defaultProps = {
...Component.defaultProps,
t: (key: string) => key
};
return Component;
}
}));