mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-11-02 02:19:43 +00:00
Introduce feature_interests schema + realtime publication and surface opt-in trends in the admin dashboard. Add Jest test infrastructure/coverage for the mobile app and update push-all to run mobile checks before pushing. Co-authored-by: Claude Code <claude@anthropic.com>
31 lines
869 B
TypeScript
31 lines
869 B
TypeScript
import React, { PropsWithChildren } from 'react';
|
|
import {
|
|
render as rtlRender,
|
|
RenderOptions,
|
|
} from '@testing-library/react-native';
|
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
|
|
export function createTestQueryClient() {
|
|
return new QueryClient({
|
|
defaultOptions: {
|
|
queries: {
|
|
retry: false,
|
|
},
|
|
mutations: {
|
|
retry: false,
|
|
},
|
|
},
|
|
});
|
|
}
|
|
|
|
export function TestProviders({ children }: PropsWithChildren) {
|
|
const queryClient = createTestQueryClient();
|
|
return <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>;
|
|
}
|
|
|
|
export function render(ui: React.ReactElement, options?: RenderOptions) {
|
|
return rtlRender(ui, { wrapper: TestProviders, ...options });
|
|
}
|
|
|
|
export * from '@testing-library/react-native';
|