Migrate react-i18next translate in ui-tests

This commit is contained in:
Florian Scholdei
2019-10-23 16:23:46 +02:00
parent 6b21f609f4
commit bc61362e19

View File

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