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
git clone [email protected]:mkopinsky/vue-test-loading-order-issue.git
npm install
npm run test:passes # This runs Parent.test.js first, and passes
npm run test:fails # This runs Child.test.js first, and fails
What is expected?
Test outcomes should not depend on the order the tests run
What is actually happening?
If the test for the parent component is run before the test for the child component, everything is dandy.
If a test for the child component is run first, the test for the parent component fails with Error: [vue-test-utils]: find did not return Component, cannot call find() on empty Wrapper when I call wrapper.find(ChildComponent)
The text was updated successfully, but these errors were encountered:
Thank you for providing a good minimal reproduction.
The issue was a hangover from previous versions where we needed to remove cached constructors. Due to an internal change, this is no longer necessary, so I removed the code and added a test to make sure tests don't leak like this in the future. It will be released in the next beta version
Version
1.0.0-beta.24
Reproduction link
https://github.com/mkopinsky/vue-test-loading-order-issue
Steps to reproduce
What is expected?
Test outcomes should not depend on the order the tests run
What is actually happening?
If the test for the parent component is run before the test for the child component, everything is dandy.
If a test for the child component is run first, the test for the parent component fails with
Error: [vue-test-utils]: find did not return Component, cannot call find() on empty Wrapper
when I call wrapper.find(ChildComponent)The text was updated successfully, but these errors were encountered: