这个是以分页组件做的测试,题目很久了 ,希望能为其他看到的人解决这个问题it("paging event", () => { const NUM = 3; const wrapper = shallow(<ArtNewsList />); wrapper.find("Pagination").simulate("change", NUM); expect(wrapper.find("Pagination").prop("current")).toBe(NUM); });
这个是以分页组件做的测试,题目很久了 ,希望能为其他看到的人解决这个问题