cjk
Mix test --cover crashes with a FunctionClauseError
Hi,
in a project I am maintaining I am working on increasing test coverage. But when I wanted to check the current state of coverage with mix test --cover, I got this error:
Cover compiling modules ...
** (exit) an exception was raised:
** (FunctionClauseError) no function clause matching in :cover."-patch_code1/2-lc$^0/1-1-"/1
cover.erl:2181: :cover."-patch_code1/2-lc$^0/1-1-"(2)
cover.erl:2181: :cover.patch_code1/2
cover.erl:2183: :cover."-patch_code1/2-lc$^1/1-0-"/2
cover.erl:2183: :cover."-patch_code1/2-lc$^1/1-0-"/2
cover.erl:2191: :cover.patch_code_tuple/5
cover.erl:2183: :cover."-patch_code1/2-lc$^1/1-0-"/2
cover.erl:2183: :cover."-patch_code1/2-lc$^1/1-0-"/2
cover.erl:1649: :cover.transform/4
cover.erl:602: :cover.call/1
(mix 1.11.3) lib/mix/tasks/test.coverage.ex:142: anonymous fn/2 in Mix.Tasks.Test.Coverage.cover_compile/1
(elixir 1.11.3) lib/enum.ex:2193: Enum."-reduce/3-lists^foldl/2-0-"/3
(mix 1.11.3) lib/mix/tasks/test.coverage.ex:141: Mix.Tasks.Test.Coverage.cover_compile/1
(mix 1.11.3) lib/mix/tasks/test.coverage.ex:122: Mix.Tasks.Test.Coverage.start/2
(mix 1.11.3) lib/mix/tasks/test.ex:336: Mix.Tasks.Test.do_run/3
(mix 1.11.3) lib/mix/task.ex:394: Mix.Task.run_task/3
(mix 1.11.3) lib/mix/task.ex:439: Mix.Task.run_alias/5
08:53:12.591 [error] Process #PID<0.3787.0> raised an exception
** (FunctionClauseError) no function clause matching in :cover."-patch_code1/2-lc$^0/1-1-"/1
cover.erl:2181: :cover."-patch_code1/2-lc$^0/1-1-"(2)
cover.erl:2181: :cover.patch_code1/2
cover.erl:2183: :cover."-patch_code1/2-lc$^1/1-0-"/2
cover.erl:2183: :cover."-patch_code1/2-lc$^1/1-0-"/2
cover.erl:2191: :cover.patch_code_tuple/5
cover.erl:2183: :cover."-patch_code1/2-lc$^1/1-0-"/2
cover.erl:2183: :cover."-patch_code1/2-lc$^1/1-0-"/2
cover.erl:1649: :cover.transform/4
Am I doing something wrong?
Best regards,
CK
Marked As Solved
josevalim
Creator of Elixir
That’s definitely a bug. Make sure you are on latest Elixir and, if the bug persists, please open up a report!
0
Last Post!
cjk
Popular in Questions
Hi there,
I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible.
total = 10
while total != 0
...
New
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
Using vs code and installed ElixirLS: support and debugger.
And I got an error popped up on start up says
Failed to run ‘elixir’ comma...
New
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]
15:22:35.803 [error] gen_event {lager_file_backend...
New
Other popular topics
I have an umbrella app.
Some of the apps inside depend on other apps in the umbrella, unsurprisingly.
I’m writing a test for one of the...
New
Phoenix 1.4.0 released
Phoenix 1.4 is out! This release ships with exciting new features, most notably
with HTTP2 support, improved deve...
New
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
New
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
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
Hi,
I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
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










