@@ -256,7 +256,7 @@ describe('getComponentProps', () => {
256
256
return utils . getComponentProps ( data )
257
257
}
258
258
259
- it ( 'should return empty array when there is no props property ' , ( ) => {
259
+ it ( 'should return empty array when there is no component props ' , ( ) => {
260
260
props = parse ( `const test = {
261
261
name: 'test',
262
262
data() {
@@ -267,7 +267,7 @@ describe('getComponentProps', () => {
267
267
assert . equal ( props . length , 0 )
268
268
} )
269
269
270
- it ( 'should return empty array when props property is empty array' , ( ) => {
270
+ it ( 'should return empty array when component props is empty array' , ( ) => {
271
271
props = parse ( `const test = {
272
272
name: 'test',
273
273
props: []
@@ -276,7 +276,7 @@ describe('getComponentProps', () => {
276
276
assert . equal ( props . length , 0 )
277
277
} )
278
278
279
- it ( 'should return empty array when props property is empty object array ' , ( ) => {
279
+ it ( 'should return empty array when component props is empty object' , ( ) => {
280
280
props = parse ( `const test = {
281
281
name: 'test',
282
282
props: {}
@@ -288,6 +288,7 @@ describe('getComponentProps', () => {
288
288
it ( 'should return computed props' , ( ) => {
289
289
props = parse ( `const test = {
290
290
name: 'test',
291
+ ...test,
291
292
data() {
292
293
return {}
293
294
},
@@ -314,7 +315,7 @@ describe('getComponentProps', () => {
314
315
assert . ok ( props [ 2 ] . node . type === 'Property' )
315
316
assert . ok ( props [ 2 ] . value . type === 'ArrayExpression' )
316
317
317
- assert . ok ( props [ 3 ] . key . type === props [ 3 ] . value . type )
318
+ assert . deepEqual ( props [ 3 ] . key , props [ 3 ] . value )
318
319
assert . ok ( props [ 3 ] . node . type === 'Property' )
319
320
assert . ok ( props [ 3 ] . value . type === 'Identifier' )
320
321
} )
0 commit comments