You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are currently using overmind on a project and have added Jest snapshots for testing the coverage and the components.
import { render } from '@testing-library/react'
import Home from './page'
it(`renders correctly`, () => {
const { container } = render(<Home />)
expect(container).toMatchSnapshot()
})
Withing the home page a few sub components are rendered which use the useAppState function and this creates some issues within the test:
The Overmind hook could not find an Overmind instance on the context of React. Please make sure you use the Provider component at the top of your application and expose the Overmind instance there. Please read more in the React guide on the website
const { myState } = useAppState().api
How to make overmind compatible with the following types of tests.
The text was updated successfully, but these errors were encountered:
We are currently using overmind on a project and have added Jest snapshots for testing the coverage and the components.
Withing the home page a few sub components are rendered which use the
useAppState
function and this creates some issues within the test:How to make overmind compatible with the following types of tests.
The text was updated successfully, but these errors were encountered: