@@ -30,7 +30,9 @@ describe('domToReact', () => {
30
30
} ) ;
31
31
32
32
it ( 'converts multiple DOM nodes to React' , ( ) => {
33
- const reactElements = domToReact ( htmlToDOM ( html . multiple ) ) as JSX . Element [ ] ;
33
+ const reactElements = domToReact (
34
+ htmlToDOM ( html . multiple ) ,
35
+ ) as React . JSX . Element [ ] ;
34
36
reactElements . forEach ( ( reactElement , index ) => {
35
37
expect ( reactElement . key ) . toBe ( String ( index ) ) ;
36
38
} ) ;
@@ -83,7 +85,7 @@ describe('domToReact', () => {
83
85
} ) ;
84
86
85
87
it ( 'does not have `children` for void elements' , ( ) => {
86
- const reactElement = domToReact ( htmlToDOM ( html . img ) ) as JSX . Element ;
88
+ const reactElement = domToReact ( htmlToDOM ( html . img ) ) as React . JSX . Element ;
87
89
expect ( reactElement . props . children ) . toBe ( undefined ) ;
88
90
} ) ;
89
91
@@ -97,7 +99,7 @@ describe('domToReact', () => {
97
99
it ( 'skips doctype and comments' , ( ) => {
98
100
const reactElements = domToReact (
99
101
htmlToDOM ( html . doctype + html . single + html . comment + html . single ) ,
100
- ) as JSX . Element [ ] ;
102
+ ) as React . JSX . Element [ ] ;
101
103
expect ( reactElements ) . toHaveLength ( 2 ) ;
102
104
expect ( reactElements [ 0 ] . key ) . toBe ( '1' ) ;
103
105
expect ( reactElements [ 1 ] . key ) . toBe ( '3' ) ;
@@ -177,15 +179,15 @@ describe('replace option', () => {
177
179
( value ) => {
178
180
const reactElement = domToReact ( htmlToDOM ( '<br>' ) , {
179
181
replace : ( ) => value ,
180
- } ) as JSX . Element ;
182
+ } ) as React . JSX . Element ;
181
183
expect ( reactElement ) . toEqual ( < br /> ) ;
182
184
} ,
183
185
) ;
184
186
185
187
it ( 'does not set key for a single node' , ( ) => {
186
188
const reactElement = domToReact ( htmlToDOM ( html . single ) , {
187
189
replace : ( ) => < div /> ,
188
- } ) as JSX . Element ;
190
+ } ) as React . JSX . Element ;
189
191
expect ( reactElement . key ) . toBe ( null ) ;
190
192
} ) ;
191
193
@@ -213,7 +215,7 @@ describe('replace option', () => {
213
215
}
214
216
} ,
215
217
} ,
216
- ) as JSX . Element [ ] ;
218
+ ) as React . JSX . Element [ ] ;
217
219
218
220
expect ( reactElements [ 0 ] . key ) . toBe ( '0' ) ;
219
221
expect ( reactElements [ 1 ] . key ) . toBe ( 'myKey' ) ;
@@ -247,7 +249,7 @@ describe('transform option', () => {
247
249
transform : ( reactNode , domNode , index ) => {
248
250
return < div key = { index } > { reactNode } </ div > ;
249
251
} ,
250
- } ) as JSX . Element ;
252
+ } ) as React . JSX . Element ;
251
253
252
254
expect ( reactElement . key ) . toBe ( '0' ) ;
253
255
expect ( reactElement . props . children . props . children [ 0 ] . key ) . toBe ( '0' ) ;
0 commit comments