File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -104,12 +104,18 @@ describe('mount: general tests', () => {
104
104
} )
105
105
106
106
it ( 'should remove wrapper div when unmount' , ( ) => {
107
- expect ( document . body . firstChild , 'Container should be empty' ) . toBeNull ( ) ;
107
+ expect ( document . body . firstChild , 'Container should be empty' ) . toBeNull ( )
108
108
109
- const wrapper = mount ( Hello , { props : { msg : 'Hello world' } , attachTo : document . body } ) ;
110
- expect ( document . body . firstChild , 'Container should have mounted component wrapper' ) . toBeInstanceOf ( HTMLDivElement ) ;
111
-
112
- wrapper . unmount ( ) ;
113
- expect ( document . body . firstChild , 'Container should be empty' ) . toBeNull ( ) ;
109
+ const wrapper = mount ( Hello , {
110
+ props : { msg : 'Hello world' } ,
111
+ attachTo : document . body
112
+ } )
113
+ expect (
114
+ document . body . firstChild ,
115
+ 'Container should have mounted component wrapper'
116
+ ) . toBeInstanceOf ( HTMLDivElement )
117
+
118
+ wrapper . unmount ( )
119
+ expect ( document . body . firstChild , 'Container should be empty' ) . toBeNull ( )
114
120
} )
115
121
} )
You can’t perform that action at this time.
0 commit comments