fix router tests and create seaparate package ui-tests

This commit is contained in:
Sebastian Sdorra
2019-10-10 15:05:17 +02:00
parent 72afcf0f23
commit 9d50ed05e1
19 changed files with 109 additions and 75 deletions

7
scm-ui/ui-tests/i18n.js Normal file
View File

@@ -0,0 +1,7 @@
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;
}
}));