Open nelsonic opened 5 years ago
P.S: I never ask anyone to do something I'm not prepared to do myself: https://codecov.io/github/dwyl/phoenix-chat-example?branch=master
on localhost
, the result of running the command MIX_ENV=test mix cover
is:
Clearly we have some work to do to write a few more test ... 👷
We shouldn't need to write any more tests, the only lines that aren't covered are autogenerated Phoenix code
@Danwhy yeah, I'm mostly seeing that ... however excoveralls thinks the Macros aren't being used:
Yeah, that's unfortunately a known issue: https://github.com/parroty/excoveralls/issues/59
@Danwhy yeah, sucks that Macros don't get "instrumented" for coverage. Does it mean we need to switch to using "normal" Modules/Functions? see: #8
It is something to consider. I'll write up some of the pros and cons of each approach when answering #8
@dwyl we have a "Gold Standard" for examples/tutorials which must be followed without exception. Tutorials aimed at beginners should always have "complete tests" to eliminate any "excuse" people may have for not writing tests in their projects.
An example is incomplete without having 100% test coverage because it either means that there is superfluous code (which can be removed) OR there is untested code; functionality that is "magic". Both are "below expectations".
At present this example has 56% coverage: https://codecov.io/github/dwyl/phoenix-ecto-append-only-log-example?branch=master
Todo