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
I am trying to generate a snapshot using jest in React Native. But it always creates a null snapshot and also does not covers the file for code coverage.
For reference please see the below code.
SignInScreen.test.tsx.snap
exports[renders correctly renders correctly sign in view 1] = null;
SignInScreen.test.tsx
import React from 'react'
import { Provider } from 'react-redux'
import renderer from 'react-test-renderer'
import { persistStore } from 'redux-persist'
import { PersistGate } from 'redux-persist/integration/react'
import store from '../../../store/store'
import SignInScreen from './SignInScreen'
const persistor = persistStore(store)
jest.useFakeTimers()
describe('renders correctly', () => {
const wrapper = renderer.create(
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<SignInScreen />
</PersistGate>
</Provider>,
)
it('renders correctly sign in view ', () => {
expect(wrapper.toJSON()).toMatchSnapshot()
})
})
The text was updated successfully, but these errors were encountered:
I am trying to generate a snapshot using jest in React Native. But it always creates a null snapshot and also does not covers the file for code coverage.
For reference please see the below code.
SignInScreen.test.tsx.snap
exports[
renders correctly renders correctly sign in view 1
] =null
;SignInScreen.test.tsx
The text was updated successfully, but these errors were encountered: