Skip to content

Commit d75e17a

Browse files
author
Said Shah
committed
Added tests for heading icon
1 parent bd4d744 commit d75e17a

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed
Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
import React from "react";
2+
import faker from "faker";
3+
import { HeadingIcon } from "./heading-icon";
4+
import { render } from "@testing-library/react";
5+
import { Icons } from "../constants/icons";
26

37
describe("HeadingIcon", () => {
4-
test.skip("TODO - https://github.com/AndcultureCode/AndcultureCode.JavaScript.React.Components/issues/14", () => {});
8+
test("when default props, renders Heading with Icon", () => {
9+
// Arrange
10+
const expected = faker.random.words();
11+
12+
// Act
13+
const { getByText } = render(
14+
<HeadingIcon type={Icons.Checkmark}>{expected}</HeadingIcon>
15+
);
16+
17+
// Assert
18+
expect(getByText(expected)).not.toBeNil();
19+
});
520
});

0 commit comments

Comments
 (0)