4

I get a bit tired of switching between Tmux panes so I'm trying to just work with vim and iex rather than entering mix commands into another console.

With that goal in mind, I enter the following into the iex console but my tests don't appear to execute:

Mix.env(:test)
Mix.Task.reenable "test"
Mix.Task.run "test", []

The console output is:

iex(52)>Mix.env(:test)
:ok
iex(53)>Mix.Task.reenable "test"
:ok
iex(54)>Mix.Task.run "test", []


Finished in 0.00 seconds
0 tests, 0 failures

Randomized with seed 732638
[#Function<4.72894143/1 in Mix.Tasks.Test.run/1>,
 #Function<4.72894143/1 in Mix.Tasks.Test.run/1>,
 #Function<4.72894143/1 in Mix.Tasks.Test.run/1>,
 #Function<4.72894143/1 in Mix.Tasks.Test.run/1>,
 #Function<4.72894143/1 in Mix.Tasks.Test.run/1>,
 #Function<4.72894143/1 in Mix.Tasks.Test.run/1>,
 #Function<4.72894143/1 in Mix.Tasks.Test.run/1>,
 #Function<4.72894143/1 in Mix.Tasks.Test.run/1>,
 #Function<4.72894143/1 in Mix.Tasks.Test.run/1>,
 #Function<4.72894143/1 in Mix.Tasks.Test.run/1>,
 #Function<4.72894143/1 in Mix.Tasks.Test.run/1>,
 #Function<4.72894143/1 in Mix.Tasks.Test.run/1>]

Can anyone give me a pointer on how to make this work?

bryan hunt
  • 644
  • 4
  • 20

1 Answers1

0

I had the same issue, couldn't really fix the problem but as a workaround you can use

Mix.Shell.cmd("mix test", fn _ -> nil end)

See docs

Morteza
  • 21
  • 1
  • 2