These are chat archives for airbnb/enzyme

14th
Jul 2017
Tom
@goto1
Jul 14 2017 19:27

perhaps i am not understaing something, but the following...

const MyComponent = 
  <div>
    <i className='icon' />
    <i className='icon' />
    <i className='icon' />
  </div>

// then in my test...
const wrapper = shallow(<MyComponent />)
const icons = wrapper.find('i') // icons.length = 0
// or even
const icons = wrapper.find('.icon') // icons.length = 0

shouldn't the length property be equal to the length of the i elements?

which would be 3 for this example