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
importReactfrom"react";import{mount}from"enzyme";importNewTagModalfrom"./NewTagModal";describe("New Tag Modal",()=>{letcomponent;functionmountComponent(){returnmount(<NewTagModalisOpen={true}/>;);}beforeEach(()=>{component=mountComponent();});it("has a title",()=>{expect(component.find("h4").text()).toBe("Create New Tag");});});
Returns:
TypeError: Cannot read property 'child' of undefined
72 |
73 | function mountComponent() {
> 74 | return mount(
at getFiber (../../../node_modules/enzyme-adapter-react-16/src/detectFiberTags.js:15:35)
at detectFiberTags (../../../node_modules/enzyme-adapter-react-16/src/detectFiberTags.js:76:15)
at ReactSixtee^C
Expected behavior
Tests pass
API
shallow
mount
render
Version
library
version
enzyme
3.11.0
react
16.4.0
react-dom
16.4.0
react-test-renderer
n/a
adapter (below)
enzyme-adapter-react-16
Adapter
enzyme-adapter-react-16
enzyme-adapter-react-16.3
enzyme-adapter-react-16.2
enzyme-adapter-react-16.1
enzyme-adapter-react-15
enzyme-adapter-react-15.4
enzyme-adapter-react-14
enzyme-adapter-react-13
enzyme-adapter-react-helper
others ( )
The text was updated successfully, but these errors were encountered:
Current behavior
Returns:
Expected behavior
Tests pass
API
Version
Adapter
The text was updated successfully, but these errors were encountered: