Answers for "enzye check if it renders"

1

enzye check if it renders

describe('when x', () => {
  it('check if child renders', () => {
    const wrapper = shallow(<Parent />);
    expect(wrapper.find(ChildComponentName).length).toEqual(1);
  });
});
Posted by: Guest on May-21-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language