blob: 541da44c18356d18b2ab61aaf51ff4a0b01fa61b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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();
});
});
|