mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-15 09:46:16 +01:00
fix router tests and create seaparate package ui-tests
This commit is contained in:
7
scm-ui/ui-tests/i18n.js
Normal file
7
scm-ui/ui-tests/i18n.js
Normal 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;
|
||||
}
|
||||
}));
|
||||
Reference in New Issue
Block a user