Skip to content

Add a warning for mis-named mount variables #1816

Open
@AbrahamBrookes

Description

@AbrahamBrookes

Feature Description

Add a warning for mis-named mount variables

Problem

I name my local vue instance (created from a call to createLocalVue) LocalVue (with a captial) for no reason at all. I then proceeded to have two hours of troubleshooting as my tests kept throwing up issues and undefined errors and googling didn't help me at all. Turns out changing that variable name to localVue (no capital) fixed it all. I'm guessing that the mount function requires specific variable names?

Expected behaviour

I expected the tests to run as per usual.

Alternatives

If this kind of thing can't be gracefully handled by type-sniffing the input variables then an informative warning that explains what is missing would be invaluable: "WARNING: mount did not find a suitable vue instance. Please ensure you pass a Vue instance to the mount constructor - use either "vue" or "localVue" for your variable name (CASE SENSITIVE)"

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