import React from 'react'; import { describe, expect, it, vi } from 'vitest'; import { render, screen } from '@testing-library/react'; vi.mock('@/shared/guest/i18n/useTranslation', () => ({ useTranslation: () => ({ t: (_key: string, fallback?: string) => fallback ?? _key }), })); vi.mock('@/hooks/use-appearance', () => ({ useAppearance: () => ({ resolved: 'dark' }), })); vi.mock('@/shared/guest/i18n/LocaleContext', () => ({ useLocale: () => ({ locale: 'de' }), })); vi.mock('@/shared/guest/components/legal-markdown', () => ({ LegalMarkdown: () =>
Legal markdown
, })); vi.mock('@tamagui/scroll-view', () => ({ ScrollView: ({ children }: { children: React.ReactNode }) =>
{children}
, })); vi.mock('@tamagui/stacks', () => ({ YStack: ({ children }: { children: React.ReactNode }) =>
{children}
, XStack: ({ children }: { children: React.ReactNode }) =>
{children}
, })); vi.mock('@tamagui/text', () => ({ SizableText: ({ children }: { children: React.ReactNode }) => {children}, })); vi.mock('@tamagui/button', () => ({ Button: ({ children, ...rest }: { children: React.ReactNode }) => ( ), })); vi.mock('lucide-react', () => ({ X: () => x, })); vi.mock('../components/SettingsContent', () => ({ default: () =>
Settings content
, })); import SettingsSheet from '../components/SettingsSheet'; describe('SettingsSheet', () => { it('renders settings content inside the sheet', () => { render(); expect(screen.getByText('Settings content')).toBeInTheDocument(); }); });