@@ -34,5 +34,37 @@ describe("Flex", () => {
34
34
expect ( FlexElement ) . toHaveStyle ( "flex-direction: row" ) ;
35
35
} ) ;
36
36
} ) ;
37
+ describe ( "for justifyContent" , ( ) => {
38
+ it ( "should render with justifyContent center" , ( ) => {
39
+ render ( < Flex justifyContent = "center" > FlexChild</ Flex > ) ;
40
+ const FlexElement = screen . getByText ( "FlexChild" ) ;
41
+ expect ( FlexElement ) . toHaveStyle ( "justify-content: center" ) ;
42
+ } ) ;
43
+ it ( "should render with justifyContent end" , ( ) => {
44
+ render ( < Flex justifyContent = "end" > FlexChild</ Flex > ) ;
45
+ const FlexElement = screen . getByText ( "FlexChild" ) ;
46
+ expect ( FlexElement ) . toHaveStyle ( "justify-content: flex-end" ) ;
47
+ } ) ;
48
+ it ( "should render with justifyContent spaceBetween" , ( ) => {
49
+ render ( < Flex justifyContent = "spaceBetween" > FlexChild</ Flex > ) ;
50
+ const FlexElement = screen . getByText ( "FlexChild" ) ;
51
+ expect ( FlexElement ) . toHaveStyle ( "justify-content: space-between" ) ;
52
+ } ) ;
53
+ it ( "should render with justifyContent spaceAround" , ( ) => {
54
+ render ( < Flex justifyContent = "spaceAround" > FlexChild</ Flex > ) ;
55
+ const FlexElement = screen . getByText ( "FlexChild" ) ;
56
+ expect ( FlexElement ) . toHaveStyle ( "justify-content: space-around" ) ;
57
+ } ) ;
58
+ it ( "should render with justifyContent spaceEvenly" , ( ) => {
59
+ render ( < Flex justifyContent = "spaceEvenly" > FlexChild</ Flex > ) ;
60
+ const FlexElement = screen . getByText ( "FlexChild" ) ;
61
+ expect ( FlexElement ) . toHaveStyle ( "justify-content: space-evenly" ) ;
62
+ } ) ;
63
+ it ( "should render with justifyContent stretch" , ( ) => {
64
+ render ( < Flex justifyContent = "stretch" > FlexChild</ Flex > ) ;
65
+ const FlexElement = screen . getByText ( "FlexChild" ) ;
66
+ expect ( FlexElement ) . toHaveStyle ( "justify-content: stretch" ) ;
67
+ } ) ;
68
+ } ) ;
37
69
} ) ;
38
70
} ) ;
0 commit comments