-
Notifications
You must be signed in to change notification settings - Fork 110
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
feat: Add types for Vue 3 #180
Conversation
Looks like this is finally unblocked. Is there anything I can do to help out and get this merged? Looks like testing-library is not happy with a linting error in node_modules... that seems weird. vue-testing-library/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts I am not familiar with this code base yet, or why this might be happening, my guess is this is not intended. Edit: I ran |
Edit: I fixed the tests failing on my machine, but now I get something different.
🤔 Edit: had to use my local TS. I got the error CI has:
Now I will work on fixing it. |
Argh, I followed the same breadcrumbs you did and found your exact post: microsoft/dtslint#297 (comment) ... haha. Edit: I sunk a LOT of time into figuring this out and had no luck. Tslint is always so frustrating to deal with. Can we just remove the |
Edit again: here is my findings.
await rerender({a: 1}) // $ExpectType Promise<void> I am not 100% sure about this but I think this test is wrong. Since we do rerender({a: 1}) // $ExpectType Promise<void> It would be nice to solve this, but I have no idea how to proceed. Since this is still an unstable release ( |
Codecov Report
@@ Coverage Diff @@
## next #180 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 84 86 +2
Branches 26 27 +1
=========================================
+ Hits 84 86 +2
Continue to review full report at Codecov.
|
🎉 This PR is included in version 6.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Fixes #167
Waiting on:
vuejs/test-utils#252 to get types from there.
vuejs/test-utils#254 to fix CI due to missing
vue-class-component
dep.The important files of this PR are
https://github.com/testing-library/vue-testing-library/blob/vue3-types/types/index.d.ts
and
https://github.com/testing-library/vue-testing-library/blob/vue3-types/types/test.ts
Decided to rename the main file and to remove the
moduleNameMapper
jest option because TS wasn't getting the right types. I thought that tweaking jest+TS+whatever was worth the "import {render} from '@testing-library/vue'
" statement to make tests more similar to what people do on their codebases.