Skip to content

Warning messages thrown about child components created with vue.extend even when parent component is mounted with shallowmount #973

@hanjra-pb02

Description

@hanjra-pb02

Version

1.0.0-beta.25

Reproduction link

// Components created with Vue.extend are not created internally in Vue
// by extending a localVue constructor. To make sure they inherit
// properties add to a localVue constructor, we must create new components by
// extending the original extended components from the localVue constructor.
// We apply a global mixin that overwrites the components original
// components with the extended components when they are created.

Steps to reproduce

ShallowMount a component that has child components created with vue.extend

What is expected?

as shallow mount automatically stubs all child components there should be no warning about how child components has been modified

What is actually happening?

Getting these warnings.

[vue-test-utils]: The child component xyz has been modified to ensure it is created with properties injected by Vue Test Utils. This is because the component was created with Vue.extend, or uses the Vue Class Component decorator. Because the component has been modified, it is not possible to find it with a component selector. To find the component, you must stub it manually usi ng the stubs mounting option, or use a name or ref selector. You can hide this warning by setting the Vue Test Utils config.logModifiedComponents option to false.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions