testing-library / vue-testing-library

🦎 Simple and complete Vue.js testing utilities that encourage good testing practices.
http://testing-library.com/vue
MIT License
1.08k stars 109 forks source link

Tests fail when using injecting custom components globally #289

Open iamBevan opened 1 year ago

iamBevan commented 1 year ago

Describe the bug Extending a globally registered component causes the tests associated with it to fail.

To Reproduce Steps to reproduce the behavior: Extend a globally registered component:

Vue.use(
        ComponentA,
        {
            customComponent: CustomComponent,
        }
    );

Expected behavior Once the components are registered in jest.setup.js, they should work as usual.

Related information: