jminnihan
When writing a Jest test for a App.jsx based AppController.js function using the TestUtils.getControllerOf(component.instance()) statement, I receive the following error: TypeError: cannot read property '__reactViewControllersIdForTesting' of null. ` describe("App Controller", () => { beforeEach(() => { TestUtils.init(); }); afterEach(() => { TestUtils.clean(); }); it("should login the user via the login function", () => { const component = mount(<App />); const controller = TestUtils.getControllerOf(component.instance()); const user = controller.login('[email protected]', 'myP@sswd'); expect(user).toEqual({ email: "[email protected]", username: 'user' }); });` React: 16.8.6 Controllerim: 1.62.0 Jest: 24.7.1