Closed fdietze closed 2 years ago
Hi @fdietze
I've just encountered the issue a few hours ago. It happens when a function (probably js native) has multiple parameters and some of them are not set. It should be valid especially when these parameters are optional in the js function, but it breaks the coverage.
For example : JSON.parse("{}")
should be valid but will fail. To make it work you'll have to provide the second parameter that is a function that transforms the value so you have to write JSON.parse("{}", (key, value) => value)
.
another example : element.addEventListener("mouseup", someCallback) will not work without the
useCapture` parameter set.
Sometimes adding an extra parameter keeps the same behaviors, sometimes not. It may also have an impact on performance.
I hope this issue could be fixed since this is very common.
There is a chance that this has been fixed with some recent changes like https://github.com/scoverage/scalac-scoverage-plugin/pull/466. Are you able to test this again with the latest version to see if your issue is fixed? I'll move this over to the main repo since they fix would actually be there.
Looks like it's working now, thank you!
I just added the scoverage plugin to a scalajs project and it fails with the following error:
https://github.com/outwatch/outwatch/runs/4499199813?check_suite_focus=true#step:7:219
PR: https://github.com/outwatch/outwatch/pull/553