aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules/images/responsive-image.test.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-10-09 18:26:23 +0200
committerArmand Philippot <git@armandphilippot.com>2023-11-11 18:14:41 +0100
commit15522ec9146f6f1956620355c44dea2a6a75b67c (patch)
tree7be0c4ca96cb3e59d2ee989785a6b6a286e6169d /src/components/molecules/images/responsive-image.test.tsx
parent891441a76173c708c6604fa203b175aefa222333 (diff)
refactor(components): replace ResponsiveImage with Figure component
The styles applied to ResponsiveImage are related to the figure and figcaption elements. Those elements could be use with other contents than images. So I extracted them in a Figure component. The ResponsiveImage component is no longer useful: the consumer should use the Image component from `next` and wrap it in a link if needed.
Diffstat (limited to 'src/components/molecules/images/responsive-image.test.tsx')
-rw-r--r--src/components/molecules/images/responsive-image.test.tsx19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/components/molecules/images/responsive-image.test.tsx b/src/components/molecules/images/responsive-image.test.tsx
deleted file mode 100644
index dec36ea..0000000
--- a/src/components/molecules/images/responsive-image.test.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-import { describe, expect, it } from '@jest/globals';
-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();
- });
-});