fchabouis

fchabouis

Test coverage includes dependencies?

Hi,
I tried the mix test --cover command and was surprised to see included in the results coverage analysis of the dependencies I use.

This doesn’t seem relevant to me, as I’m only interested in the coverage of my code.
Is this expected or am I doing something wrong ?

I have an umbrella app, and I tried to launch the command both on the root of the umbrella or for a specific app, the result is the same.

Thanks for your help !

Marked As Solved

hauleth

hauleth

I assume that you are talking about all that Jason.Encoder.* modules:

These aren’t dependencies, these are actual modules in your application, just autogenerated as I assume you are using @derive Jason.Encoder in them. The reason for that is that is how the protocols work - under the hood these are behaviours with additional function that is runtime-dispatched.

Also Liked

fchabouis

fchabouis

Thanks for the reply !

Ok that’s much clearer now : I am not directly using @derive in my code, but I am using a dependency which is using @derive Jason.Encoder.

Also thanks @mpope for your advice.

Last Post!

fchabouis

fchabouis

Thanks for the reply !

Ok that’s much clearer now : I am not directly using @derive in my code, but I am using a dependency which is using @derive Jason.Encoder.

Also thanks @mpope for your advice.

Where Next?

Popular in Questions Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New

Other popular topics Top

vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 42576 114
New

We're in Beta

About us Mission Statement