Skip to content

Instantly share code, notes, and snippets.

@tidusia
Created October 29, 2020 08:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tidusia/e0cf294d8d9aecbeeb387ce6f32f84c7 to your computer and use it in GitHub Desktop.
Save tidusia/e0cf294d8d9aecbeeb387ce6f32f84c7 to your computer and use it in GitHub Desktop.
import React from "react";
import { render } from "@testing-library/react";
import { Props } from ".";
import { Default } from "./index.stories";
test("should render the title", () => {
const props = Default.args as Props;
const { getByText } = render(<Default {...props} />);
const actual = getByText(props.title);
expect(actual).toBeInTheDocument();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment