Replies: 2 comments 2 replies
-
Thanks!
|
Beta Was this translation helpful? Give feedback.
-
This just saved me a lot of time. Thank you @mydea! |
Beta Was this translation helpful? Give feedback.
-
Thanks!
|
Beta Was this translation helpful? Give feedback.
-
This just saved me a lot of time. Thank you @mydea! |
Beta Was this translation helpful? Give feedback.
-
This is not really an "issue" per se, but I ran into a variety of steps I had to do in our app to update the types to v4, which might or might not be unavoidable. But I figured others might run into this as well, so maybe this helps in some way.
The main things I had to do to get it to work again after updating all type packages to their latest version were:
this.element
is typed "correctly" in tests for qunit-dom. Asassert.dom(this.element)
will not work anymore, asthis.element
isDocument | Element
which is not accepted by qunit-dom. So I replaced those withassert.dom(this.element as Element)
, basically. Not sure if this is unavoidable or if this should be updated in one place or the other to simply allowthis.element
. Also not really sure when this could return aDocument
, but 🤷this.owner.lookup('service:my-service') as MyService
, as that now returns unknown instead of any.TestContext
from@ember/test-helpers
instead ofember-test-helpers
and get rid of @types/ember-test-helpers (see Types for ember-test-helpers are confusing #1470)Finally, and maybe the most important (?) step, I had to actually remove all @types/ember**** mentions from my yarn.lock file and completely re-generate all type-related dependencies, as I seemed to get stuck in some weird in-between dependency state which broke stuff as well. That made it work for me, in the end.
Beta Was this translation helpful? Give feedback.
All reactions