diff options
Diffstat (limited to 'src/components/molecules/card/card-cover.test.tsx')
| -rw-r--r-- | src/components/molecules/card/card-cover.test.tsx | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/components/molecules/card/card-cover.test.tsx b/src/components/molecules/card/card-cover.test.tsx new file mode 100644 index 0000000..541da44 --- /dev/null +++ b/src/components/molecules/card/card-cover.test.tsx @@ -0,0 +1,23 @@ +import { describe, expect, it } from '@jest/globals'; +import { render, screen as rtlScreen } from '@testing-library/react'; +import NextImage from 'next/image'; +import { CardCover } from './card-cover'; + +describe('CardCover', () => { + it('renders a cover', () => { + const altTxt = 'nam cupiditate ex'; + + render( + <CardCover> + <NextImage + alt={altTxt} + height={480} + src="https://picsum.photos/640/480" + width={640} + /> + </CardCover> + ); + + expect(rtlScreen.getByRole('img', { name: altTxt })).toBeInTheDocument(); + }); +}); |
