Skip to content

TypeError: Cannot read property 'installed' of undefined when using localVue.use(<PLUGIN>) #822

Closed
@cesalberca

Description

@cesalberca

Version

1.0.0-beta.20

Reproduction link

https://github.com/cesalberca/vue-test-utils-bug

Steps to reproduce

Update vue-test-utils to 1.0.0-beta.20 and run tests.

What is expected?

No errors.

What is actually happening?

Every test that uses localVue.use fails with the following error:

TypeError: Cannot read property 'installed' of undefined

I don't know if it's related but I can't use Vue.extend() in order to mount a directive in another Vue instance:

const ComponentClass = Vue.extend(LoadingLayer)

export const loadingDirective = Vue.directive('loading', {
  inserted(el: HTMLElement, binding: VNodeDirective) {
   ...
  }
}

If I move ComponentClass inside the directive (which won't work as expected) I still get cannot read extend of undefined.


I think Vue has a lot of potential, but if you guys want to get the attention of big companies I really think you should offer first class support with TypeScript –which is used a lot in big projects–, and I don't think right now that is achieved. Anyway, tell me anything that you need and I will offer all the help that is required and thank you for your time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions