You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On opening the reproduction link, go straight to the "Tests" tab.
What is expected?
There should be 2 failed tests: "01 should fail" and "03 should fail" - they are exactly the same.
Plugins added to a local vue instance created using createLocalVue should only be applied to that vue instance.
What is actually happening?
Only "01 should fail" fails. The test that runs in the middle unexpectedly causes the third to succeed. Furthermore, in codesandbox you'll notice that by re-running the tests they will all start succeeding.
Hence, plugins added to a local vue instance created using createLocalVue get applied to all future vue instances created using createLocalVue.
See tests/unit/test.spec.js.
This can also be reproduced in tests across multiple files - depending on the order the test files are run in, one can get different results if an earlier file registers a plugin on a local vue instance (created using createLocalVue). Therefore, createLocalVue doesn't seem to be returning fresh vue instances without any plugins. This is a problem because it means that if we have lots of tests across many files and wish to register plugins in some tests and not others, we cannot do it, and the order that tests run in becomes important (it shouldn't be).
Ideally each time you call createLocalVue you should receive a fresh vue instance without any plugins installed.
The text was updated successfully, but these errors were encountered:
Currently when we auto stub components we add a name to the original unnamed components, in order to ensure we can identify them in find when you use the component constructor. This is a workaround that we should fix, as you said, tests should be reproducible. I'll look into an alternative for future versions.
Version
1.0.0-beta.24
Reproduction link
https://codesandbox.io/s/rmr67jmolo
Steps to reproduce
On opening the reproduction link, go straight to the "Tests" tab.
What is expected?
There should be 2 failed tests: "01 should fail" and "03 should fail" - they are exactly the same.
Plugins added to a local vue instance created using createLocalVue should only be applied to that vue instance.
What is actually happening?
Only "01 should fail" fails. The test that runs in the middle unexpectedly causes the third to succeed. Furthermore, in codesandbox you'll notice that by re-running the tests they will all start succeeding.
Hence, plugins added to a local vue instance created using createLocalVue get applied to all future vue instances created using createLocalVue.
See tests/unit/test.spec.js.
This can also be reproduced in tests across multiple files - depending on the order the test files are run in, one can get different results if an earlier file registers a plugin on a local vue instance (created using createLocalVue). Therefore, createLocalVue doesn't seem to be returning fresh vue instances without any plugins. This is a problem because it means that if we have lots of tests across many files and wish to register plugins in some tests and not others, we cannot do it, and the order that tests run in becomes important (it shouldn't be).
Ideally each time you call createLocalVue you should receive a fresh vue instance without any plugins installed.
The text was updated successfully, but these errors were encountered: