@@ -6,27 +6,32 @@ afterEach(cleanup);
6
6
7
7
describe ( '<List />' , ( ) => {
8
8
it ( 'should support bordered' , ( ) => {
9
- const { getByRole } = render ( < List bordered = { true } >
10
- < ListItem content = "Hello ChatUI" />
11
- </ List > ) ;
9
+ const { getByRole } = render (
10
+ < List bordered = { true } >
11
+ < ListItem content = "Hello ChatUI" />
12
+ </ List > ,
13
+ ) ;
12
14
const list = getByRole ( 'list' ) ;
13
- expect ( list ) . toHaveClass ( 'bordered' ) ;
15
+ expect ( list ) . toHaveClass ( 'List-- bordered' ) ;
14
16
} ) ;
15
17
16
18
it ( 'should support right icon' , ( ) => {
17
- const { getByRole } = render ( < List >
18
- < ListItem content = "Hello ChatUI" rightIcon = "chevron-right" />
19
- </ List > ) ;
19
+ const { getByRole } = render (
20
+ < List >
21
+ < ListItem content = "Hello ChatUI" rightIcon = "chevron-right" />
22
+ </ List > ,
23
+ ) ;
20
24
const listItem = getByRole ( 'listitem' ) ;
21
25
expect ( listItem . querySelectorAll ( '.Icon' ) . length ) . toBe ( 1 ) ;
22
26
} ) ;
23
27
24
28
it ( 'should support as' , ( ) => {
25
- const { getByRole } = render ( < List >
26
- < ListItem as = "a" content = "Hello ChatUI" rightIcon = "chevron-right" />
27
- </ List > ) ;
29
+ const { getByRole } = render (
30
+ < List >
31
+ < ListItem as = "a" content = "Hello ChatUI" rightIcon = "chevron-right" />
32
+ </ List > ,
33
+ ) ;
28
34
const list = getByRole ( 'list' ) ;
29
35
expect ( list . querySelectorAll ( 'a' ) . length ) . toBe ( 1 ) ;
30
36
} ) ;
31
-
32
37
} ) ;
0 commit comments