From 6b261fa7cb3c6ce2226f88e5feef29fe26cd111e Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Wed, 7 Oct 2020 15:38:45 +0200 Subject: [PATCH] Add mock for useTranslation to i18n of ui-tests --- scm-ui/ui-tests/i18n.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scm-ui/ui-tests/i18n.ts b/scm-ui/ui-tests/i18n.ts index ce71069f0f..2588bc6d9b 100644 --- a/scm-ui/ui-tests/i18n.ts +++ b/scm-ui/ui-tests/i18n.ts @@ -30,5 +30,10 @@ jest.mock("react-i18next", () => ({ t: (key: string) => key }; return Component; + }, + useTranslation: (ns: string) => { + return [ + (key: string) => key + ]; } }));