Unit testing with Auth0

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:

    <Provider store={store}>
        <ConnectedRouter history={history}>
                <App />

The problem comes with testing this code. My test looks like

  const { container } = render(
    <Provider store={store}>
        <App />

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?

Hey there!

Unfortunately I’m not a JS guy but maybe some of our docs for testing will guide you: