[Feature Request] Avoid importing globally Vuetify in all tests
See original GitHub issueVersions and Environment
Vuetify: ^1.1.11 Vue: 2.5.16 Browsers: all OS: all
Previously worked in:
Vuetify: ^1.1.10 Vue: 2.5.16
Steps to reproduce
Since Vuetify version 1.1.11, developers have to import globally Vuetify in all tests to avoid having 2 multiples Vue instances running (and see a warning referring to #4068 )
localVue.use(Vuetify)
has been replaced by
Vue.use(Vuetify)
Expected Behavior
Using localVue is better because it prevents polluting the original Vue copy during tests.
I expect Vuetify not to use its own instance of Vue.
So I can come back using only localVue.use(Vuetify)
in all of my tests
Actual Behavior
I had to use Vue.use(Vuetify)
in each of my test files
Reproduction Link
https://codesandbox.io/s/mz86zx5vnj
Watch the warnings generated by the test
Additional Comments:
Issue Analytics
- State:
- Created 5 years ago
- Reactions:60
- Comments:26 (7 by maintainers)
Top Results From Across the Web
Get started with Vuetify
Get started with Vuetify, the world's most popular Vue.js framework for building feature rich, blazing fast applications. # Vue CLI Install. For ...
Read more >Accessing properties globally in Vue.js with prototypes
You will notice that for every component from which you want to make a get request, you will have to repeat this import...
Read more >Using custom theming in Vuetify and pass color variables to ...
There is a Feature Request on github: Access theme colors in stylus files ... Import the Vuetify styles somewhere global @import ...
Read more >Testing Vue Components With Cypress - CSS-Tricks
Once component testing arrived in Cypress, my team was all in ... and we needed to get Vuetify and some global styles happening...
Read more >Configuration Reference | Vue CLI
Global CLI Config #. Some global configurations for @vue/cli , such as your preferred package manager and your locally saved presets, are stored ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is super confusing, guys. Any updates here?
An update on this issue. Currently with how we must extend the Vue object in order to have proper typescript support, you will have to bootstrap Vue in your test setup file:
I have dropped the ball on providing clear documentation on how to do this and for that I apologize. This is something that I will be adding to the documentation in the coming weeks for the next version.
In regards to a long term solution, I’m accepting any and all suggestions on how to accommodate typescript support while also enabling the bootstrapping of
localVue
.