File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
packages/runtime-vapor/__tests__/dom Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -779,16 +779,19 @@ describe('api: template ref', () => {
779779
780780 expect ( fn1 ) . toHaveBeenCalledTimes ( 1 )
781781 expect ( fn2 ) . toHaveBeenCalledTimes ( 0 )
782+ expect ( app . _instance ! . scope . cleanups . length ) . toBe ( 1 )
782783
783784 toggle . value = false
784785 await nextTick ( )
785786 expect ( fn1 ) . toHaveBeenCalledTimes ( 1 )
786787 expect ( fn2 ) . toHaveBeenCalledTimes ( 1 )
788+ expect ( app . _instance ! . scope . cleanups . length ) . toBe ( 1 )
787789
788790 toggle . value = true
789791 await nextTick ( )
790792 expect ( fn1 ) . toHaveBeenCalledTimes ( 2 )
791793 expect ( fn2 ) . toHaveBeenCalledTimes ( 1 )
794+ expect ( app . _instance ! . scope . cleanups . length ) . toBe ( 1 )
792795
793796 app . unmount ( )
794797 await nextTick ( )
@@ -823,11 +826,13 @@ describe('api: template ref', () => {
823826
824827 expect ( el1 . value ) . toBe ( host . children [ 0 ] )
825828 expect ( el2 . value ) . toBe ( null )
829+ expect ( app . _instance ! . scope . cleanups . length ) . toBe ( 1 )
826830
827831 toggle . value = false
828832 await nextTick ( )
829833 expect ( el1 . value ) . toBe ( null )
830834 expect ( el2 . value ) . toBe ( host . children [ 0 ] )
835+ expect ( app . _instance ! . scope . cleanups . length ) . toBe ( 1 )
831836
832837 app . unmount ( )
833838 await nextTick ( )
You can’t perform that action at this time.
0 commit comments