-
Notifications
You must be signed in to change notification settings - Fork 244
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
Vite Build fails because of test TypeScript error #1191
Comments
Hi @rrd108 It's hard to say what's going on without at least the component code and which versions are you using. Would you mind sharing a minimal reproduction with us? Ideally a GitHub repository with just the minimum required to reproduce your issue. |
Here is the repo: https://github.com/rrd108/vue-test-utils-1191 Outputs in my system. Tests
Build
|
Thanks, that's what I was suspecting: your component is using We are doing some magic in VTU to make this test possible, but we are waiting for a fix in Vue itself to make this type-checking possible. In the meantime, you have to explicitly add a cast like You can track #972 and vuejs/core#4465 Closing this one as duplicates. |
My build fails because of typescript errors in a test
The error message is
error TS2339: Property 'inAccountNumberRange' does not exist on type '{ $: ComponentInternalInstance; $data: {}; $props: Partial<{ results: Item[]; }> & Omit<Readonly<{ results?: unknown; accountStart?: unknown; accountEnd?: unknown; } & { results: Item[]; } & { ...; }> & VNodeProps & AllowedComponentProps & ComponentCustomProps, "results">; ... 10 more ...; $watch(source: string | Fu...'.
inAccountNumberRange
is a method in theSearchDetailed
componentThe test runs fine, only the build fails.
The test is in the same folder as the component
The text was updated successfully, but these errors were encountered: