Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React from "react";
- import Page from "./Page.js";
- const exampleLinkFactory = () => (
- <a href={`#`} />
- );
- describe("Pagination/Page", () => {
- const defaultProps = { linkFactory: exampleLinkFactory };
- rendersComponent(Page, defaultProps);
- const wrapper = mount(
- <Page { ...defaultProps } />
- );
- it("renders a div with the guc-page class", () => {
- expect(wrapper.find("div.guc-page").exists()).toEqual(true);
- });
- it("renders the link generated by the linkFactory", () => {
- expect(wrapper.html()).toContain(`<a href=\"#\"></a>`);
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement