-
Notifications
You must be signed in to change notification settings - Fork 13
Description
First off, I really liked the API/implementation of Patch. Really enjoy using it so thanks for making it
But whilst experimenting with some code coverage tooling (mix test --cover) noticed that code that uses Patch.patch disappears from the reports.
So decided to clone this repo and noticed the same. Picked a test at random that uses patch(), refute_any_call_test.exs
❯ grep 'patch(' ./test/user/refute_any_call_test.exs
patch(RefuteAnyCall, :function_with_multiple_arities, :patched)
(..)
patch(RefuteAnyCall, :other_function, :patched)
patch(RefuteAnyCall, :function_with_multiple_arities, :patched)but then:
mix test --cover 2>&1 | grep RefuteAnyoutputs nothing, same for
grep RefuteAnyCall cover -rwhich, seeing all the generated html files in cover/ seems unlikely
I assume this is known behaviour? I can imagine its a side-effect of how the 'super-powers' work but are you aware of a workaround or fix? Because its a bit ironic that the most well tested code in my codebase shows up as 0% or not at all :)
And a ps. Running the test directly mix test --cover ./test/user/refute_any_call_test.exs does show the User.Patch modules nearby but almost all of them as 0% coverage