@@ -174,19 +174,23 @@ describeWithMountingMethods('options.stub', mountingMethod => {
174
174
expect ( HTML ) . not . to . contain ( '<span>' )
175
175
} )
176
176
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' ) ] )
184
182
}
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>' )
185
193
} )
186
- const HTML =
187
- mountingMethod . name === 'renderToString' ? wrapper : wrapper . html ( )
188
- expect ( HTML ) . to . contain ( '<registered-component-stub>' )
189
- } )
190
194
191
195
it ( 'stubs components with dummy when passed as an array' , ( ) => {
192
196
const ComponentWithGlobalComponent = {
0 commit comments