Skip to content

Commit

Permalink
fix: coveralls
Browse files Browse the repository at this point in the history
  • Loading branch information
nada-deriv committed Aug 2, 2024
1 parent 8e41537 commit 71fb065
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions __mocks__/LocalizeMock.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const Localize = ({ i18n_default_text, values }) => {
const Localize = ({ i18n_default_text: i18Text, values }) => {
// Replace placeholders in the default text with actual values
const localizedText = i18n_default_text.replace(/\{\{(\w+)\}\}/g, (match, key) => values[key] || match);
const localizedText = i18Text.replace(/\{\{(\w+)\}\}/g, (match, key) => values[key] || match);

return localizedText || null;
};
Expand All @@ -15,5 +15,6 @@ const useTranslations = () => ({
});

const localize = mockFn;
const getAllowedLanguages = jest.fn(() => ({ EN: 'English' }));

export { Localize, localize, useTranslations };
export { getAllowedLanguages, Localize, localize, useTranslations };

0 comments on commit 71fb065

Please sign in to comment.