You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The not descendants test on thing2 fails with the message: AssertionError: expected <Test /> not to have descendants '.foo' HTML: Not available due to: Cannot read property 'outerHTML' of null
Switching the last expectation to the following: expect(thing2.find('.foo')).to.not.exist;
it still fails with the same error: AssertionError: expected the node in <Test /> not to exist HTML: Not available due to: Cannot read property 'outerHTML' of null
This is with enzyme 3.2.0 and react 15.4.2. With enzyme 2.x and the pre-1.0 releases, these tests worked just fine.
The text was updated successfully, but these errors were encountered:
Both the Test component and the div are being picked up by the class selector as they are both in enzymes dom representation when using mount. The same can happen for #id selectors.
It might be useful if chai-enzyme included a .htmlDescendants() or something similar to remove the React components from results. Possibly .reactDescendants() as well if you wanted the opposite, but I believe the opposite of hostNodes() would need to be added to enzyme for that.
Given this component and the following tests:
The not descendants test on thing2 fails with the message:
AssertionError: expected <Test /> not to have descendants '.foo' HTML: Not available due to: Cannot read property 'outerHTML' of null
Switching the last expectation to the following:
expect(thing2.find('.foo')).to.not.exist;
it still fails with the same error:
AssertionError: expected the node in <Test /> not to exist HTML: Not available due to: Cannot read property 'outerHTML' of null
This is with enzyme 3.2.0 and react 15.4.2. With enzyme 2.x and the pre-1.0 releases, these tests worked just fine.
The text was updated successfully, but these errors were encountered: