Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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