@@ -61,7 +61,8 @@ describe('Test Typescript component metadata generation', () => {
61
61
describe . each ( [
62
62
'TypeScriptComponent' ,
63
63
'TypeScriptClassComponent' ,
64
- 'MemoTypeScriptComponent'
64
+ 'MemoTypeScriptComponent' ,
65
+ 'FCComponent' ,
65
66
] ) ( 'Test prop type names' , componentName => {
66
67
const getPropTypeName = ( name , data ) =>
67
68
R . path ( propPath ( componentName , name ) . concat ( 'type' , 'name' ) , data ) ;
@@ -256,10 +257,16 @@ describe('Test Typescript component metadata generation', () => {
256
257
test ( 'Standard js component is parsed' , ( ) => {
257
258
expect ( R . path ( [ 'StandardComponent' ] , metadata ) ) . toBeDefined ( ) ;
258
259
} ) ;
260
+ test ( 'Mixed component prop-type & typescript' , ( ) => {
261
+ expect ( R . path ( [ 'MixedComponent' , 'props' , 'prop' , 'type' , 'name' ] , metadata ) ) . toBe ( 'arrayOf' )
262
+ } )
259
263
} ) ;
260
- describe ( 'Test namespace props ' , ( ) => {
264
+ describe ( 'Test special cases ' , ( ) => {
261
265
test ( 'Component with picked boolean prop' , ( ) => {
262
266
expect ( R . path ( [ 'WrappedHTML' , "props" , "autoFocus" , "type" , "name" ] , metadata ) ) . toBe ( "bool" ) ;
263
- } )
264
- } )
267
+ } ) ;
268
+ test ( 'Empty Component' , ( ) => {
269
+ expect ( R . path ( [ 'EmptyComponent' , 'props' ] , metadata ) ) . toBeDefined ( ) ;
270
+ } ) ;
271
+ } ) ;
265
272
} ) ;
0 commit comments