At last, we can add our final test suite and make sure NewTodo is covered as well. For the most part, we'll work with the same skeleton we already have and have used before. Create src/NewTodo.test.js and give it the following skeleton:
import React from "react";import ReactDOM from "react-dom";import { shallow } from "enzyme";import renderer from "react-test-renderer";import NewTodo from "./NewTodo";describe(NewTodo, () => { const mockAddTodo = jest.fn(); const component = shallow(<NewTodo addTodo={mockAddTodo} />); it("renders without crashing", () => { const div = document.createElement("div"); ReactDOM.render(<NewTodo addTodo={mockAddTodo} />, div); ReactDOM.unmountComponentAtNode(div); }); it("renders and matches ...