@@ -5,130 +5,56 @@ import ItemIcon from '../ItemIcon';
55describe ( 'icons/item-icon/ItemIcon' , ( ) => {
66 const getWrapper = ( props = { } ) => shallow ( < ItemIcon iconType = "" { ...props } /> ) ;
77
8- describe ( 'render()' , ( ) => {
9- [
10- {
11- iconType : 'audio' ,
12- } ,
13- {
14- iconType : 'bookmark' ,
15- } ,
16- {
17- iconType : 'boxnote' ,
18- } ,
19- {
20- iconType : 'code' ,
21- } ,
22- {
23- iconType : 'default' ,
24- } ,
25- {
26- iconType : 'document' ,
27- } ,
28- {
29- iconType : 'dwg' ,
30- } ,
31- {
32- iconType : 'excel-spreadsheet' ,
33- } ,
34- {
35- iconType : 'folder-collab' ,
36- } ,
37- {
38- iconType : 'folder-external' ,
39- } ,
40- {
41- iconType : 'folder-plain' ,
42- } ,
43- {
44- iconType : 'google-docs' ,
45- } ,
46- {
47- iconType : 'google-sheets' ,
48- } ,
49- {
50- iconType : 'google-slides' ,
51- } ,
52- {
53- iconType : 'illustrator' ,
54- } ,
55- {
56- iconType : 'image' ,
57- } ,
58- {
59- iconType : 'indesign' ,
60- } ,
61- {
62- iconType : 'keynote' ,
63- } ,
64- {
65- iconType : 'numbers' ,
66- } ,
67- {
68- iconType : 'pages' ,
69- } ,
70- {
71- iconType : 'pdf' ,
72- } ,
73- {
74- iconType : 'photoshop' ,
75- } ,
76- {
77- iconType : 'powerpoint-presentation' ,
78- } ,
79- {
80- iconType : 'presentation' ,
81- } ,
82- {
83- iconType : 'spreadsheet' ,
84- } ,
85- {
86- iconType : 'text' ,
87- } ,
88- {
89- iconType : 'threed' ,
90- } ,
91- {
92- iconType : 'folder-plain' ,
93- } ,
94- {
95- iconType : 'vector' ,
96- } ,
97- {
98- iconType : 'video' ,
99- } ,
100- {
101- iconType : 'word-document' ,
102- } ,
103- {
104- iconType : 'xbd' ,
105- } ,
106- {
107- iconType : 'xdw' ,
108- } ,
109- {
110- iconType : 'zip' ,
111- } ,
112- {
113- iconType : '' ,
114- } ,
115- ] . forEach ( ( { iconType } ) => {
116- test ( `should render ${ iconType } component` , ( ) => {
117- const wrapper = getWrapper ( { iconType } ) ;
8+ describe . each ( [
9+ 'audio' ,
10+ 'bookmark' ,
11+ 'boxnote' ,
12+ 'code' ,
13+ 'default' ,
14+ 'document' ,
15+ 'docuworks-binder' ,
16+ 'docuworks-file' ,
17+ 'dwg' ,
18+ 'excel-spreadsheet' ,
19+ 'folder-collab' ,
20+ 'folder-external' ,
21+ 'folder-plain' ,
22+ 'google-docs' ,
23+ 'google-sheets' ,
24+ 'google-slides' ,
25+ 'illustrator' ,
26+ 'image' ,
27+ 'indesign' ,
28+ 'keynote' ,
29+ 'numbers' ,
30+ 'pages' ,
31+ 'pdf' ,
32+ 'photoshop' ,
33+ 'powerpoint-presentation' ,
34+ 'presentation' ,
35+ 'spreadsheet' ,
36+ 'text' ,
37+ 'threed' ,
38+ 'vector' ,
39+ 'video' ,
40+ 'word-document' ,
41+ 'zip' ,
42+ ] ) ( 'render()' , iconType => {
43+ test ( `should render ${ iconType } component` , ( ) => {
44+ const wrapper = getWrapper ( { iconType } ) ;
11845
119- expect ( wrapper ) . toMatchSnapshot ( ) ;
120- } ) ;
121-
122- test ( 'should render component with additional props' , ( ) => {
123- const wrapper = getWrapper ( {
124- className : 'test' ,
125- dimension : 10 ,
126- iconType,
127- title : 'title' ,
128- } ) ;
46+ expect ( wrapper ) . toMatchSnapshot ( ) ;
47+ } ) ;
12948
130- expect ( wrapper ) . toMatchSnapshot ( ) ;
49+ test ( `should render ${ iconType } component with additional props` , ( ) => {
50+ const wrapper = getWrapper ( {
51+ className : 'test' ,
52+ dimension : 10 ,
53+ iconType,
54+ title : 'title' ,
13155 } ) ;
56+
57+ expect ( wrapper ) . toMatchSnapshot ( ) ;
13258 } ) ;
13359 } ) ;
13460} ) ;
0 commit comments