Skip to content

Instantly share code, notes, and snippets.

@Gethyl
Created January 5, 2017 18:34
Show Gist options
  • Save Gethyl/5669358b5cc966564a0da02bc3ee4f06 to your computer and use it in GitHub Desktop.
Save Gethyl/5669358b5cc966564a0da02bc3ee4f06 to your computer and use it in GitHub Desktop.
//*******************************************************************************************************
describe('>>>H O M E --- REACT-REDUX (Shallow + passing the {store} directly)',()=>{
const initialState = {output:100}
const mockStore = configureStore()
let store,container
beforeEach(()=>{
store = mockStore(initialState)
container = shallow(<ConnectedHome store={store} /> )
})
it('+++ render the connected(SMART) component', () => {
expect(container.length).toEqual(1)
});
it('+++ check Prop matches with initialState', () => {
expect(container.prop('output')).toEqual(initialState.output)
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment