Skip to content

Commit ac6f03b

Browse files
committed
for direction
1 parent cec281f commit ac6f03b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

libs/components/src/layout/Flex/tests.tsx

+14
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,18 @@ describe("Flex", () => {
2121
expect(FlexElement).toHaveStyle("height: auto");
2222
expect(FlexElement).toHaveStyle("width: auto");
2323
});
24+
describe("when props are passed", () => {
25+
describe("for direction", () => {
26+
it("should render with direction column", () => {
27+
render(<Flex direction="column">FlexChild</Flex>);
28+
const FlexElement = screen.getByText("FlexChild");
29+
expect(FlexElement).toHaveStyle("flex-direction: column");
30+
});
31+
it("should render with direction row", () => {
32+
render(<Flex direction="row">FlexChild</Flex>);
33+
const FlexElement = screen.getByText("FlexChild");
34+
expect(FlexElement).toHaveStyle("flex-direction: row");
35+
});
36+
});
37+
});
2438
});

0 commit comments

Comments
 (0)