Skip to content

Instantly share code, notes, and snippets.

@mickaelw
Last active August 18, 2020 10:14
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 mickaelw/4be2434cc0277b85d3b81bda4c2f134f to your computer and use it in GitHub Desktop.
Save mickaelw/4be2434cc0277b85d3b81bda4c2f134f to your computer and use it in GitHub Desktop.
describe('Integration | Component | Book information Card', () => {
it('Vérification du snapshot avec un livre', async () => {
const book = new BookDetails('title', true)
const { asFragment } = render(<BookInformationCard book={ book }/>)
await waitFor(() => {
expect(asFragment()).toMatchSnapshot()
})
})
it('Vérification du snapshot sans livre', async () => {
const { asFragment } = render(<BookInformationCard book={ null }/>)
await waitFor(() => {
expect(asFragment()).toMatchSnapshot()
})
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment