Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

enzye check if it renders

describe('when x', () => {
  it('check if child renders', () => {
    const wrapper = shallow(<Parent />);
    expect(wrapper.find(ChildComponentName).length).toEqual(1);
  });
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #enzye #check #renders
ADD COMMENT
Topic
Name
3+3 =