Skip to content

Allow use of components within Wrapper for unit tests #7476

@cnotv

Description

@cnotv

Description

Change configuration to avoid manual cast of Wrapper<YourComponent> to access wrapper.vm.

Context

Currently if a developer needs to access to a wrapper.vm to get computed or data values or other component properties, it's necessary cast manually the component type to it. This however also causes issues on build and we are forced to use the following code:

const wrapper = shallowMount(YourComponent as unknown as ExtendedVue<Vue, {}, {}, {}, DefaultProps>, {

This may require the use of a custom tsconfig as defined in the docs.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions