Skip to content

Instantly share code, notes, and snippets.

@handshake-engineering-blog
Created June 4, 2021 17:49
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 handshake-engineering-blog/1c19a2ac8f2c5b3f4c50981024ebdcff to your computer and use it in GitHub Desktop.
Save handshake-engineering-blog/1c19a2ac8f2c5b3f4c50981024ebdcff to your computer and use it in GitHub Desktop.
1801126254_2
describe("<EmployerCard />", () => {
const customResolvers = {
Query: () => ({
employers: () => ({
id: 1,
name: "Handshake",
}),
}),
};
const mountComponent = () =>
render(
<ApolloMockedProvider customResolvers={customResolvers}>
<EmployerCard id={1} />
</ApolloMockedProvider>,
);
it("renders the employer's name", async () => {
const { getByText } = mountComponent();
expect(getByText("Handshake")).toBeInTheDocument();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment