Skip to content

Commit cec281f

Browse files
committed
default config tests added
1 parent aecc66d commit cec281f

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { render, screen } from "@tests-unit-browser";
2+
import "@testing-library/jest-dom";
3+
4+
import { Flex } from "@lib-components";
5+
6+
describe("Flex", () => {
7+
it("should render without required props default config", () => {
8+
render(<Flex testId="flexId">FlexChild</Flex>);
9+
const FlexElement = screen.getByTestId("flexId");
10+
11+
expect(FlexElement).toBeInTheDocument();
12+
expect(FlexElement).toHaveTextContent("FlexChild");
13+
expect(FlexElement).toHaveStyle("display: flex");
14+
expect(FlexElement).toHaveStyle("flex-direction: row");
15+
expect(FlexElement).toHaveStyle("justify-content: flex-start");
16+
expect(FlexElement).toHaveStyle("align-items: flex-start");
17+
expect(FlexElement).toHaveStyle("flex-wrap: nowrap");
18+
expect(FlexElement).toHaveStyle("gap: 0rem");
19+
expect(FlexElement).toHaveStyle("margin: 0rem");
20+
expect(FlexElement).toHaveStyle("padding: 0rem");
21+
expect(FlexElement).toHaveStyle("height: auto");
22+
expect(FlexElement).toHaveStyle("width: auto");
23+
});
24+
});

0 commit comments

Comments
 (0)