The Wayback Machine - https://web.archive.org/web/20201212162919/https://github.com/vuejs/vue-test-utils/issues/1749
Skip to content
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 inference does not work by default in tests #1749

Open
TheDutchCoder opened this issue Dec 11, 2020 · 0 comments
Open

TypeScript inference does not work by default in tests #1749

TheDutchCoder opened this issue Dec 11, 2020 · 0 comments

Comments

@TheDutchCoder
Copy link

@TheDutchCoder TheDutchCoder commented Dec 11, 2020

Subject of the issue

When doing a clean vu-cli install with Vue3/TS/Jest options, vue-test-utils only exposes its wrapper as VueWrapper<any> which makes any mounted component have no types.

Steps to reproduce

Do a clean vue-cli install with Vue3/TS/Jest as options.
Open the example.spec.ts and hover over the wrapper.text() method, you'll see:
image

Expected behaviour

Types to be correctly inferred from the Vue component and exposed on the wrapper

Actual behaviour

It returns a VueWrapper<any> which loses all typings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.