mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 20:35:25 +02:00
chore(account): write tests for CreateAccessToken [EE-2561] (#6578)
This commit is contained in:
parent
b7d18ef50f
commit
f1ea2b5c02
8 changed files with 178 additions and 27 deletions
16
app/__mocks__/react-i18next.tsx
Normal file
16
app/__mocks__/react-i18next.tsx
Normal file
|
@ -0,0 +1,16 @@
|
|||
import { PropsWithChildren } from 'react';
|
||||
|
||||
import { mockT } from './i18next';
|
||||
|
||||
export function useTranslation() {
|
||||
return {
|
||||
t: mockT,
|
||||
i18n: {
|
||||
changeLanguage: () => new Promise(() => {}),
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export function Trans({ children }: PropsWithChildren<unknown>) {
|
||||
return <>{children}</>;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue