I have the following in the tests of a React component using chai-enzyme:
const wrapper = mount(<Something />)
expect(wrapper).to.contain(<SomethingElse />) //works
expect(wrapper).to.containMatchingElement(<SomethingElse />) //does not work
and wonder why contain
works but containMatchingElement
does not.
Aucun commentaire:
Enregistrer un commentaire