File tree Expand file tree Collapse file tree 3 files changed +23
-11
lines changed Expand file tree Collapse file tree 3 files changed +23
-11
lines changed Original file line number Diff line number Diff line change @@ -171,9 +171,10 @@ export function stubComponents(
171
171
return [
172
172
createStub ( {
173
173
name : 'transition' ,
174
+ type : type as any ,
174
175
renderStubDefaultSlot : true
175
176
} ) ,
176
- undefined ,
177
+ props ,
177
178
children
178
179
]
179
180
}
@@ -185,9 +186,10 @@ export function stubComponents(
185
186
return [
186
187
createStub ( {
187
188
name : 'transition-group' ,
189
+ type : type as any ,
188
190
renderStubDefaultSlot : true
189
191
} ) ,
190
- undefined ,
192
+ props ,
191
193
children
192
194
]
193
195
}
@@ -199,9 +201,10 @@ export function stubComponents(
199
201
return [
200
202
createStub ( {
201
203
name : 'teleport' ,
204
+ type : type as any ,
202
205
renderStubDefaultSlot : true
203
206
} ) ,
204
- undefined ,
207
+ props ,
205
208
( ) => children
206
209
]
207
210
}
Original file line number Diff line number Diff line change 1
- import { expect , test } from 'vitest'
1
+ import { describe , expect , test } from 'vitest'
2
2
import { WithTransition } from '../components/WithTransition'
3
3
import { mount } from '../../src'
4
4
5
- test ( 'works with transitions' , async ( ) => {
6
- const wrapper = mount ( WithTransition )
7
- expect ( wrapper . find ( '#message' ) . exists ( ) ) . toBe ( false )
5
+ describe ( 'transitions' , ( ) => {
6
+ test ( 'work' , async ( ) => {
7
+ const wrapper = mount ( WithTransition )
8
+ expect ( wrapper . find ( '#message' ) . exists ( ) ) . toBe ( false )
8
9
9
- await wrapper . find ( 'button' ) . trigger ( 'click' )
10
- expect ( wrapper . find ( '#message' ) . exists ( ) ) . toBe ( true )
10
+ await wrapper . find ( 'button' ) . trigger ( 'click' )
11
+ expect ( wrapper . find ( '#message' ) . exists ( ) ) . toBe ( true )
12
+ } )
13
+
14
+ test ( 'have props' , ( ) => {
15
+ const wrapper = mount ( WithTransition )
16
+ expect ( wrapper . getComponent ( { name : 'transition' } ) . props ( 'name' ) ) . toBe (
17
+ 'fade'
18
+ )
19
+ } )
11
20
} )
Original file line number Diff line number Diff line change @@ -401,7 +401,7 @@ describe('mounting options: stubs', () => {
401
401
const wrapper = mount ( CompStubbedByDefault )
402
402
403
403
expect ( wrapper . html ( ) ) . toBe (
404
- '<transition-stub>\n' +
404
+ '<transition-stub appear="false" persisted="false" css="true" >\n' +
405
405
' <div id="content-stubbed-by-default"></div>\n' +
406
406
'</transition-stub>'
407
407
)
@@ -513,7 +513,7 @@ describe('mounting options: stubs', () => {
513
513
} )
514
514
515
515
expect ( wrapper . html ( ) ) . toBe (
516
- '<teleport-stub>\n' +
516
+ '<teleport-stub to="body" >\n' +
517
517
' <div id="content"></div>\n' +
518
518
'</teleport-stub>'
519
519
)
You can’t perform that action at this time.
0 commit comments