Closed
Description
Version
1.0.0-beta.29
Reproduction link
https://github.com/Robjam/vue-test-utils-typescript-example/tree/repro/stub-false-typescript
Steps to reproduce
vue create with unit tests and typescript
in helloworld.spec.ts shallowmount add:
const wrapper = shallowMount(HelloWorld, {
stubs: {
transition: false
}
});
shallowMount encounters a type error as Stubs type (https://github.com/vuejs/vue-test-utils/blob/v1.0.0-beta.29/packages/test-utils/types/index.d.ts#L30) does not allow false.
What is expected?
that boolean is an acceptable type.
What is actually happening?
Typescript fails to compile.
It appears this is addressed in commit, but not yet released.
Workaround is to add // @ts-ignore
to line before shallowMount foregoing all type checks on mount.
Metadata
Metadata
Assignees
Labels
No labels