Open dep opened 2 years ago
import React from "react"; import { mount } from "enzyme"; import NewTagModal from "./NewTagModal"; describe("New Tag Modal", () => { let component; function mountComponent() { return mount( <NewTagModal isOpen={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
Tests pass
Can you try React v16.4.2?
Current behavior
Returns:
Expected behavior
Tests pass
API
Version
Adapter