-
Notifications
You must be signed in to change notification settings - Fork 669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typescript definition for stubs doesnn't allow false #1330
Comments
Should be merged in beta.30. please verify. |
Yep it's in the release notes. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
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.The text was updated successfully, but these errors were encountered: