File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -171,9 +171,10 @@ export function stubComponents(
171171 return [
172172 createStub ( {
173173 name : 'transition' ,
174+ type : type as any ,
174175 renderStubDefaultSlot : true
175176 } ) ,
176- undefined ,
177+ props ,
177178 children
178179 ]
179180 }
@@ -185,9 +186,10 @@ export function stubComponents(
185186 return [
186187 createStub ( {
187188 name : 'transition-group' ,
189+ type : type as any ,
188190 renderStubDefaultSlot : true
189191 } ) ,
190- undefined ,
192+ props ,
191193 children
192194 ]
193195 }
@@ -199,9 +201,10 @@ export function stubComponents(
199201 return [
200202 createStub ( {
201203 name : 'teleport' ,
204+ type : type as any ,
202205 renderStubDefaultSlot : true
203206 } ) ,
204- undefined ,
207+ props ,
205208 ( ) => children
206209 ]
207210 }
Original file line number Diff line number Diff line change 1- import { expect , test } from 'vitest'
1+ import { describe , expect , test } from 'vitest'
22import { WithTransition } from '../components/WithTransition'
33import { mount } from '../../src'
44
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 )
89
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+ } )
1120} )
Original file line number Diff line number Diff line change @@ -401,7 +401,7 @@ describe('mounting options: stubs', () => {
401401 const wrapper = mount ( CompStubbedByDefault )
402402
403403 expect ( wrapper . html ( ) ) . toBe (
404- '<transition-stub>\n' +
404+ '<transition-stub appear="false" persisted="false" css="true" >\n' +
405405 ' <div id="content-stubbed-by-default"></div>\n' +
406406 '</transition-stub>'
407407 )
@@ -513,7 +513,7 @@ describe('mounting options: stubs', () => {
513513 } )
514514
515515 expect ( wrapper . html ( ) ) . toBe (
516- '<teleport-stub>\n' +
516+ '<teleport-stub to="body" >\n' +
517517 ' <div id="content"></div>\n' +
518518 '</teleport-stub>'
519519 )
You can’t perform that action at this time.
0 commit comments