Skip to content

Commit 3d63188

Browse files
committed
Adding test
Signed-off-by: DANIEL KATOTO <katotodan@gmail.com>
1 parent b1d06e2 commit 3d63188

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { render } from '@testing-library/react';
2+
import { PeopleIcon } from '../icons';
3+
4+
describe('PeopleIcon', () => {
5+
it('renders without errors', () => {
6+
render(<PeopleIcon width={24} height={24} />);
7+
});
8+
9+
it('applies width and height', () => {
10+
const { getByTestId } = render(<PeopleIcon width={24} height={24} />);
11+
const svgElement = getByTestId('people-icon-svg');
12+
expect(svgElement.getAttribute('width')).toBe('24');
13+
expect(svgElement.getAttribute('height')).toBe('24');
14+
});
15+
});

src/icons/People/PeopleIcon.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ const PeopleIcon = ({
1212
height={height}
1313
viewBox="0 0 48 48"
1414
fill={fill}
15+
data-testid="people-icon-svg"
1516
xmlns="http://www.w3.org/2000/svg"
1617
{...props}
1718
>
1819
<path d="M3 29.4c0-4.256 8.661-6.4 13-6.4s13 2.144 13 6.4V35H3zM23 14c0 3.867-3.133 7-7 7s-7-3.133-7-7 3.133-7 7-7 7 3.133 7 7m17 4c0 2.762-2.237 5-5 5s-5-2.238-5-5 2.237-5 5-5 5 2.238 5 5" />
1920
<path
20-
fill-rule="evenodd"
21-
clip-rule="evenodd"
21+
fillRule="evenodd"
22+
clipRule="evenodd"
2223
d="M31 35v-5.6c0-1.364-.532-2.511-1.28-3.437C31.57 25.322 33.583 25 35 25c3.337 0 10 1.787 10 5.333V35z"
2324
/>
2425
</svg>

0 commit comments

Comments
 (0)