Hi, Im wondering how to setup Jest with dynamic routes with expo router?
I also use MSW for the mockCalling.
I have this for my other routes and its working:
export function renderWithProviders(
ui: ReactElement,
{
preloadedState = {},
store = setupStore(preloadedState),
...renderOptions
}: ExtendedRenderOptions = {},
) {
function Wrapper({ children }: { children: ReactElement }): JSX.Element {
return (
<ReduxProvider store={store}>
<NativeBaseProvider
theme={ApplicationTheme}
initialWindowMetrics={inset}
>
{children}
</NativeBaseProvider>
</ReduxProvider>
);
}
return { store, ...render(ui, { wrapper: Wrapper, ...renderOptions }) };
}
Then i call my route:
test('Renders without crashing', () => {
renderWithProviders(<Order />, { store: storeRef });
});
But it dosent work with a route that is dynamic