Public Access
First tests cover the library search debounce (fails on the old looping version), the Pile of Shame states and the backlog save body. jsdom is enabled per test file, so the plain util tests stay in the node environment.
7 lines
384 B
JavaScript
7 lines
384 B
JavaScript
// Module mock for react-i18next: t() returns the key (plus ":<count>" for plurals), so tests do not depend on the texts.
|
|
// Use in a test file: vi.mock('react-i18next', () => import('../test/i18n-mock.js'));
|
|
const t = (key, options) => (options?.count === undefined ? key : `${key}:${options.count}`);
|
|
const i18n = {language: 'de'};
|
|
|
|
export const useTranslation = () => ({t, i18n});
|