Skip to content

mocks only works for top component #1707

@blake-newman

Description

@blake-newman

I never realized mocks was only for the component in question - I thought it would be available to all the children, too 🤔

It sounds like this should be the default behavior.

Originally posted by @lmiller1990 in #1701 (comment)


The mocks object is only set for the first component; not it's children. This behaviour means that properties such as $route / $router are not easily mockable via integration style testing.

There is ways around this, by using localVue and creating a router instance and setting on the mount options.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions