File tree Expand file tree Collapse file tree 1 file changed +18
-6
lines changed
Expand file tree Collapse file tree 1 file changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -48,17 +48,29 @@ describe('mixins/listen-on-root', () => {
4848 expect ( spyOn ) . toHaveBeenCalledTimes ( 1 )
4949 expect ( spyOnce ) . not . toHaveBeenCalled ( )
5050
51- await wrapper . setProps ( { destroy : true } )
51+ $root . $emit ( 'root-once' )
5252 expect ( spyOn ) . toHaveBeenCalledTimes ( 1 )
53- expect ( spyOnce ) . not . toHaveBeenCalled ( )
53+ expect ( spyOnce ) . toHaveBeenCalledTimes ( 1 )
5454
5555 $root . $emit ( 'root-on' )
56- expect ( spyOn ) . toHaveBeenCalledTimes ( 1 )
57- expect ( spyOnce ) . not . toHaveBeenCalled ( )
56+ expect ( spyOn ) . toHaveBeenCalledTimes ( 2 )
57+ expect ( spyOnce ) . toHaveBeenCalledTimes ( 1 )
5858
5959 $root . $emit ( 'root-once' )
60- expect ( spyOn ) . toHaveBeenCalledTimes ( 1 )
61- expect ( spyOnce ) . not . toHaveBeenCalled ( )
60+ expect ( spyOn ) . toHaveBeenCalledTimes ( 2 )
61+ expect ( spyOnce ) . toHaveBeenCalledTimes ( 1 )
62+
63+ await wrapper . setProps ( { destroy : true } )
64+ expect ( spyOn ) . toHaveBeenCalledTimes ( 2 )
65+ expect ( spyOnce ) . toHaveBeenCalledTimes ( 1 )
66+
67+ $root . $emit ( 'root-on' )
68+ expect ( spyOn ) . toHaveBeenCalledTimes ( 2 )
69+ expect ( spyOnce ) . toHaveBeenCalledTimes ( 1 )
70+
71+ $root . $emit ( 'root-once' )
72+ expect ( spyOn ) . toHaveBeenCalledTimes ( 2 )
73+ expect ( spyOnce ) . toHaveBeenCalledTimes ( 1 )
6274
6375 wrapper . destroy ( )
6476 } )
You can’t perform that action at this time.
0 commit comments