fix: account name don't change when Update Account #248

This commit is contained in:
rustmailer
2026-05-21 10:38:04 +08:00
parent f17820bfa8
commit 3a950e7591
29 changed files with 3181 additions and 428 deletions
+1
View File
@@ -0,0 +1 @@
import '@testing-library/jest-dom/vitest'
+37
View File
@@ -0,0 +1,37 @@
import { type ReactElement } from 'react'
import { render, type RenderOptions } from '@testing-library/react'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { I18nextProvider } from 'react-i18next'
import i18n from '@/i18n'
function createTestQueryClient() {
return new QueryClient({
defaultOptions: {
queries: { retry: false },
mutations: { retry: false },
},
})
}
interface WrapperProps {
children: React.ReactNode
}
function AllProviders({ children }: WrapperProps) {
const queryClient = createTestQueryClient()
return (
<QueryClientProvider client={queryClient}>
<I18nextProvider i18n={i18n}>
{children}
</I18nextProvider>
</QueryClientProvider>
)
}
function customRender(ui: ReactElement, options?: Omit<RenderOptions, 'wrapper'>) {
return render(ui, { wrapper: AllProviders, ...options })
}
export * from '@testing-library/react'
export { customRender as render }
export { createTestQueryClient }