Isabelladr5
Ignore top line in Elixir tests
I am currently writing tests for my views and my coverage is being hindered due to the top two lines not being covered.
I’m assuming its probably because those lines don’t get executed during the run because they’re pre-compiled, but I’m not sure how to actually get around that.
If anyone knows how I can get around it please let me know?
I have tried to exclude or include only certain things but due to the heading not being a test that isn’t a solution.
First Post!
dimitarvp
Most Liked
dimitarvp
OK, no need to repeat the same reply several times. ![]()
Also please format code with ``` at the start and the end (on new lines), so it’s more readable.
If you are seeking higher code coverage you should show us the code that you are testing, not the tests themselves I think.
You can also screenshot your test coverage results and post them here?
Last Post!
Isabelladr5
No, I am not using excoveralls.
I have used the dependency before and it shows that I have 100% coverage as the lines that aren’t covered are not relevant - is there no way I can use the normal mix test --cover and exclude the top lines?
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









