@@ -52,6 +52,20 @@ describe('props test', () => {
5252 } ) ;
5353
5454
55+ it ( 'defineNameOnlyProps.vue' , ( ) => {
56+ const filename = 'propsTest/defineNameOnlyProps' ;
57+ const declaration = getImportDeclarationTree ( join ( fixturesDir , `${ filename } .vue` ) , [ ] , true ) ;
58+
59+ expect ( declaration ) . toStrictEqual ( {
60+ name : `/test/fixture/${ filename } .vue` ,
61+ props : [ 'foo' ] ,
62+ size : 222 ,
63+ lastModifiedTime : 0 ,
64+ children : [ ] ,
65+ } ) ;
66+ } ) ;
67+
68+
5569 it ( 'defineTwoProps.vue' , ( ) => {
5670 const filename = 'propsTest/defineTwoProps' ;
5771 const declaration = getImportDeclarationTree ( join ( fixturesDir , `${ filename } .vue` ) , [ ] , true ) ;
@@ -94,6 +108,24 @@ describe('props test', () => {
94108 } ) ;
95109
96110
111+
112+ it ( 'defineTypeOnlyPropsVariables.vue' , ( ) => {
113+ const filename = 'propsTest/defineTypeOnlyPropsVariables' ;
114+ const declaration = getImportDeclarationTree ( join ( fixturesDir , `${ filename } .vue` ) , [ ] , true ) ;
115+
116+ expect ( declaration ) . toStrictEqual ( {
117+ name : `/test/fixture/${ filename } .vue` ,
118+ props : {
119+ title : 'String' ,
120+ likes : 'Number' ,
121+ } ,
122+ size : 112 ,
123+ lastModifiedTime : 0 ,
124+ children : [ ] ,
125+ } ) ;
126+ } ) ;
127+
128+
97129 it ( 'defineTypeOnlyPropsWithTypeScript.vue' , ( ) => {
98130 const filename = 'propsTest/defineTypeOnlyPropsWithTypeScript' ;
99131 const declaration = getImportDeclarationTree ( join ( fixturesDir , `${ filename } .vue` ) , [ ] , true ) ;
0 commit comments