enzyme props test code example
Example: enzye check if it renders
describe('when x', () => {
it('check if child renders', () => {
const wrapper = shallow(<Parent />);
expect(wrapper.find(ChildComponentName).length).toEqual(1);
});
});
describe('when x', () => {
it('check if child renders', () => {
const wrapper = shallow(<Parent />);
expect(wrapper.find(ChildComponentName).length).toEqual(1);
});
});