Skip to content

Enzyme examples

Yuqi Wu edited this page Oct 27, 2016 · 1 revision
  • How to get prop of a wrapper(component), also can get attribute of a dom node
import Component from 'some_component'
const wrapper = mount(
      <Component
         prop1={value1}
        />
    );
const valOfProp1 = wrapper.find(Component).at(0).prop(['prop1'])

Clone this wiki locally