Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to pass props in react test cases

it('renders results after search', () => {
  const fetched = true;
  const wrapper = mount(<Search store={store} {...fetched}/>);
  expect(wrapper.find('Results').length).toEqual(1);
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pass #props #react #test #cases
ADD COMMENT
Topic
Name
7+7 =