aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules/images/responsive-image.test.tsx
blob: a738686b6318a1f4001e79a977b947cd05d2d3b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { render, screen } from '../../../../tests/utils';
import { ResponsiveImage } from './responsive-image';

describe('ResponsiveImage', () => {
  it('renders a responsive image', () => {
    render(
      <ResponsiveImage
        src="http://placeimg.com/640/480"
        alt="An alternative text"
        width={640}
        height={480}
      />
    );
    expect(
      screen.getByRole('img', { name: 'An alternative text' })
    ).toBeInTheDocument();
  });
});