I'am trying to load the iex.iexs
file when debugging a test. I created an alias
in Mix.exs
that tries to import it.
defp aliases do
[
...,
"ex.file": [&import_iex_file/1, "compile"]
]
end
defp import_iex_file(_var) do
require IEx.Helpers
# This raises a File.Error if ~/.iex.exs doesn't exist.
if "./.iex.exs" |> Path.expand() |> File.exists?() do
IEx.Helpers.import_file("./.iex.exs")
end
end
When I run a test with iex -S mix test_path
the file is loaded, but when it stop at the IEx.pry
I can't access the aliases that I added at the .iex.iex
file.