Skip to content

vue-test-utils v1.0.0-beta.22 broke my test #879

Closed
@joehecn

Description

@joehecn

Version

1.0.0-beta.22

Reproduction link

joehecn/j#6

What is expected?

I expect that everything will still be working as it used to

What is actually happening?

I does not work. Raising this error:

TypeError: Cannot read property '$el' of undefined
      76 |     cloneStoreConfig.state.curGroupMd5 = 'md5'
      77 |     const store = createStore(cloneStoreConfig)
    > 78 |     const wrapper = mount(Chat, {
         |                     ^
      79 |       mocks: { $$worker, $router },
      80 |       store,
      81 |       localVue
      at VueComponent.mounted (node_modules/element-ui/lib/element-ui.common.js:9126:54)
      at callHook (node_modules/vue/dist/vue.runtime.common.js:2919:21)
      at Object.insert (node_modules/vue/dist/vue.runtime.common.js:4156:7)
      at invokeInsertHook (node_modules/vue/dist/vue.runtime.common.js:5958:28)
      at VueComponent.patch [as __patch__] (node_modules/vue/dist/vue.runtime.common.js:6177:5)
      at VueComponent.Vue._update (node_modules/vue/dist/vue.runtime.common.js:2658:19)
      at VueComponent.updateComponent (node_modules/vue/dist/vue.runtime.common.js:2786:10)
      at Watcher.get (node_modules/vue/dist/vue.runtime.common.js:3140:25)
      at new Watcher (node_modules/vue/dist/vue.runtime.common.js:3129:12)
      at mountComponent (node_modules/vue/dist/vue.runtime.common.js:2793:3)
      at VueComponent.Object.<anonymous>.Vue.$mount (node_modules/vue/dist/vue.runtime.common.js:7997:10)
      at mount (node_modules/@vue/test-utils/dist/vue-test-utils.js:5543:21)
      at Object.test (__tests__/view/Chat.test.js:78:21)

Here's the full test code: https://travis-ci.org/joehecn/j/builds/409703349?utm_source=github_status&utm_medium=notification

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions