I have an app that was created with Create-React-App and from the quick starts I have an Auth0Provider component. That basically wraps the main component like:
ReactDOM.render(
<Provider store={store}>
<ConnectedRouter history={history}>
<Auth0Provider
domain={config.domain}
clientId={config.client_id}
redirectUri={window.location.origin}
>
<App />
</Auth0Provider>
</ConnectedRouter>
</Provider>,
document.getElementById('root'));
The problem comes with testing this code. My test looks like
const { container } = render(
<Provider store={store}>
<MemoryRouter>
<App />
</MemoryRouter>
</Provider>
);
Notice that I have not rendered the component because I get a message that ‘window.cryto’ is required. How can I essentially ‘mock’ this component (which is how the App is wrapped) for unit testing?