@@ -907,6 +907,65 @@ describe('vapor transition', () => {
907907 describe . todo ( 'transition with Suspense' , ( ) => { } )
908908 describe . todo ( 'transition with Teleport' , ( ) => { } )
909909
910+ describe ( 'transition with AsyncComponent' , ( ) => {
911+ test ( 'apply transition to inner component' , async ( ) => {
912+ const btnSelector = '.async > button'
913+ const containerSelector = '.async > div'
914+
915+ expect ( await html ( containerSelector ) ) . toBe ( '' )
916+
917+ // toggle
918+ await click ( btnSelector )
919+ await nextTick ( )
920+ // not yet resolved
921+ expect ( await html ( containerSelector ) ) . toBe ( '' )
922+
923+ // wait resolving
924+ await timeout ( duration )
925+
926+ // enter (resolved)
927+ expect ( await html ( containerSelector ) ) . toBe (
928+ '<div class="v-enter-from v-enter-active">vapor compA</div>' ,
929+ )
930+ await nextFrame ( )
931+ expect ( await html ( containerSelector ) ) . toBe (
932+ '<div class="v-enter-active v-enter-to">vapor compA</div>' ,
933+ )
934+ await transitionFinish ( )
935+ expect ( await html ( containerSelector ) ) . toBe (
936+ '<div class="">vapor compA</div>' ,
937+ )
938+
939+ // leave
940+ await click ( btnSelector )
941+ await nextTick ( )
942+ expect ( await html ( containerSelector ) ) . toBe (
943+ '<div class="v-leave-from v-leave-active">vapor compA</div>' ,
944+ )
945+ await nextFrame ( )
946+ expect ( await html ( containerSelector ) ) . toBe (
947+ '<div class="v-leave-active v-leave-to">vapor compA</div>' ,
948+ )
949+ await transitionFinish ( )
950+ expect ( await html ( containerSelector ) ) . toBe ( '' )
951+
952+ // enter again
953+ await click ( btnSelector )
954+ // use the already resolved component
955+ expect ( await html ( containerSelector ) ) . toBe (
956+ '<div class="v-enter-from v-enter-active">vapor compA</div>' ,
957+ )
958+ await nextFrame ( )
959+ expect ( await html ( containerSelector ) ) . toBe (
960+ '<div class="v-enter-active v-enter-to">vapor compA</div>' ,
961+ )
962+ await transitionFinish ( )
963+ expect ( await html ( containerSelector ) ) . toBe (
964+ '<div class="">vapor compA</div>' ,
965+ )
966+ } )
967+ } )
968+
910969 describe ( 'transition with v-show' , ( ) => {
911970 test (
912971 'named transition with v-show' ,
0 commit comments