ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/llms-txt-hub / apps/web/__tests__/utils/test-providers.tsx

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/llms-txt-hub / apps/web/__tests__/utils/test-providers.tsx
DateNot specified in source
RepositoryJanady13/llms-txt-hub
Revisione0f4bf978d4df168369c7601d9c5f5ea89e84377
Branchmain
Path or archive memberapps/web/__tests__/utils/test-providers.tsx
Original SHA-25650b136eb7e6f32633037d1519cbcceab0454f88d0d5d46e975ffa49763f1d547
Git blob SHA9436586f01381325e02bdec757e2862e72cc24dd
Reading-copy SHA-25650b136eb7e6f32633037d1519cbcceab0454f88d0d5d46e975ffa49763f1d547

Original source ↗

Recovered source transcript

/** * Test provider components and utilities */ import { QueryClient, QueryClientProvider } from '@tanstack/react-query' import type { RenderOptions } from '@testing-library/react' import { ThemeProvider } from 'next-themes' import type { ReactNode } from 'react' import { FavoritesProvider } from '@/contexts/favorites-context' export interface CustomRenderOptions extends Omit<RenderOptions, 'wrapper'> { user?: any isAuthenticated?: boolean theme?: 'light' | 'dark' queryClient?: QueryClient wrapperProps?: Record<string, any> } /** * Creates a test query client with default configuration * * @returns Configured QueryClient for testing */ export function createTestQueryClient() { return new QueryClient({ defaultOptions: { queries: { retry: false, gcTime: 0 }, mutations: { retry: false } } }) } /** * Wrapper component that provides all necessary contexts for testing * * @param props - Component props * @returns React component with all providers */ export function TestProviders({ children, queryClient, theme = 'light' }: { children: ReactNode queryClient?: QueryClient theme?: 'light' | 'dark' user?: any isAuthenticated?: boolean }) { const testQueryClient = queryClient || createTestQueryClient() return ( <QueryClientProvider client={testQueryClient}> <ThemeProvider attribute="class" defaultTheme={theme} enableSystem={false} disableTransitionOnChange > <FavoritesProvider>{children}</FavoritesProvider> </ThemeProvider> </QueryClientProvider> ) }

Search equations, builds, manuscript text, and recovered sources.