-
Notifications
You must be signed in to change notification settings - Fork 668
test breaks when switch import #781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
here is the component:
here is the test:
|
Hi, sorry for the bug. Are you using the latest version (1.0.0-beta.20)? The example you've posted is too large for me to debug, and I need to know other details (like @vue/test-utils version). Can you make a minimal reproduction in code sand box using the example template? |
No 1.0.0-beta.18 |
I don't know how to run jasmine tests on codepen |
I've edited the pen as much as I can |
The point is wrapper.emitted() returns undefined when using @vue/test-utils instead of what it is supposed to |
Yes, but we have tests for wrapper.emitted, so it doesn't return undefined in all circumstances. Can you try updating to beta.20 to see if the bug persists? If not, please create a minimal repo in a GitHub repository, or in codesandbox—https://codesandbox.io/s/m4qk02vjoy. |
There's already an issue open for I'm working on a fix that will be out soon. |
Version
1.0.0-beta.18
Reproduction link
https://codepen.io/anon/pen/NzeOvE
Steps to reproduce
npm test
What is expected?
test to pass
What is actually happening?
test fails with:
When I switch the import from "vue-test-utils" to "@vue/test-utils" one of my tests breaks.
wrapper.emitted() resolves to undefined in the latter case, and I get an "TypeError: undefined is not an object" error
Given that:
it follows that it is something to do with @vue/test-utils itself.
The text was updated successfully, but these errors were encountered: