Open userquin opened 5 months ago
Hi @userquin
VTU listens to all possible DOM events (see dom-events.ts
), so I think this warning is expected, and probably not a big deal (if you don't use these events yourself in your application).
Maybe we can remove them in a future VTU version to avoid the warnings and hope that this won't break tests out there that rely on these.
If you're willing to, a PR would be most welcome.
This message is spammed in every Cypress component test, unluckily More a nuisance than a real problem
@IlCallo A PR to fix this should be fairly simple and greatly appreciated 👍
Why is VTU listining for those events in the first place? Just to allow devs to listen to them in their tests? Or are they actually used by the library?
Yes, VTU listens to all possible events to record them and allow developers to check them with wrapper.emitted()
(see vueWrapper.ts
)
This code was probably the same in VTU v1. I started helping with the maintenance after this was written so I don't know why this design was picked.
Anyway, I think removing the culprit events from dom-events.ts
should be enough. This means developers won't be able to check them with emitted()
but as these events are getting deprecated, I suppose it's fine.
Is your feature request related to a problem? Please describe.
Running Vitest Browser 2.0 beta 5 on tresjs test I can see a lot of warnings from chrome in the console about relying on
DOMXXX
event listeners:The example can be found here: https://github.com/Tresjs/tres/pull/715
Describe the solution you'd like
Here the link https://chromestatus.com/feature/5083947249172480 .
Describe alternatives you've considered
None
Additional context
NA