-
Notifications
You must be signed in to change notification settings - Fork 668
TypeError: Cannot read property '$el' of undefined #958
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
Labels
Comments
It happened to me as well while upgrading from 1.0.0-beta.24 to 1.0.0-beta.25. While running the tests I get: ● default › should match the snapshot
TypeError: Cannot read property '$el' of undefined
10 |
11 | it('should match the snapshot', () => {
> 12 | expect(vm.$el).toMatchSnapshot()
| ^
13 | })
14 |
15 | it('should have link to the campaign list page', () => {
at Object.<anonymous> (tests/unit/specs/views/NotFound.spec.js:12:15) I put everything in a gist: https://gist.github.com/rhymes/9972f9259711035156545c00efae73c3 |
When solve this problem?Thanks |
This is caused by the synchronous Transition stub component that Vue Test Utils adds by default. You can turn it off with the mount(TestComponent, {
stubs: {
transition: false
}
}) |
This was referenced Nov 25, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
1.0.0-beta.24
Reproduction link
https://codesandbox.io/s/7307xq2171
Steps to reproduce
Bump
@vue/test-utils
version from1.0.0-beta.21
to any later/latest version to reproduce the bug on provided sandbox link.What is expected?
There shouldn't be any error on console.
What is actually happening?
TypeError: Cannot read property '$el' of undefined
.This issue does not occur on
1.0.0-beta.21
.The text was updated successfully, but these errors were encountered: