-
-
Save handshake-engineering-blog/1c19a2ac8f2c5b3f4c50981024ebdcff to your computer and use it in GitHub Desktop.
1801126254_2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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