@@ -174,19 +174,23 @@ describeWithMountingMethods('options.stub', mountingMethod => {
174174 expect ( HTML ) . not . to . contain ( '<span>' )
175175 } )
176176
177- it ( 'stubs components with dummy when passed a boolean' , ( ) => {
178- const ComponentWithGlobalComponent = {
179- render : h => h ( 'div' , [ h ( 'registered-component' ) ] )
180- }
181- const wrapper = mountingMethod ( ComponentWithGlobalComponent , {
182- stubs : {
183- 'registered-component' : true
177+ itDoNotRunIf (
178+ mountingMethod . name === 'renderToString' ,
179+ 'stubs components with dummy which has name when passed a boolean' , ( ) => {
180+ const ComponentWithGlobalComponent = {
181+ render : h => h ( 'div' , [ h ( 'registered-component' ) ] )
184182 }
183+ const wrapper = mountingMethod ( ComponentWithGlobalComponent , {
184+ stubs : {
185+ 'registered-component' : true
186+ }
187+ } )
188+ const HTML =
189+ mountingMethod . name === 'renderToString' ? wrapper : wrapper . html ( )
190+ expect ( HTML ) . to . contain ( '<registered-component-stub>' )
191+ expect ( wrapper . find ( { name : 'registered-component' } ) . html ( ) )
192+ . to . equal ( '<registered-component-stub></registered-component-stub>' )
185193 } )
186- const HTML =
187- mountingMethod . name === 'renderToString' ? wrapper : wrapper . html ( )
188- expect ( HTML ) . to . contain ( '<registered-component-stub>' )
189- } )
190194
191195 it ( 'stubs components with dummy when passed as an array' , ( ) => {
192196 const ComponentWithGlobalComponent = {
0 commit comments