Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

find component inside tree with enzyme shallow wrapper

import Foo from '../components/Foo';

const wrapper = shallow(<MyComponent />);
expect(wrapper.find(Foo)).to.have.lengthOf(1);
Source by enzymejs.github.io #
 
PREVIOUS NEXT
Tagged: #find #component #tree #enzyme #shallow #wrapper
ADD COMMENT
Topic
Name
3+3 =