Closed mst101 closed 1 year ago
I was wondering whether switching to using vitest might help?
Hooray! This appears to solve the issues I was having... I'll upload a PR asap.
OK, this PR overcomes the trouble we were having with test coverage (when updating the dependencies) by switching from jest to vitest.
You should be able to merge this into your original PR at #167 and once you've done that, continue with merging #178, #179 and #184.
Hi @MrWook - I've also been trying to update the dependencies for this project - and what a PITA it is!
Like you (I presume), I've discovered that as soon as you update node beyond v16.16.0, the lines in the coverage reports are wrong. e.g. reference is made to an uncovered statement in
DateInput.vue
on line 557... when that line does not exist!It seems to be something to do with babel...
But then again, if you stay on v16.16.0, the
Popup.vue
,inputProps.vue
,navMixin.vue
reports are missing when they should be included according to the value ofcollectCoverageFrom
injest.config.js
.On the plus side, I've found a workaround which avoids some tests from failing when you update
vue-test-utils
as you have done in this branch. There seems to be a bug in the v1.14 release which causesinput.trigger("focus")
to stop working. Writinginput.element.dispatchEvent(new Event("focus"))
instead does the trick.I don't know know how to overcome the coverage issue... Have you got any ideas? I was wondering whether switching to using vitest might help? I'll have a go...