mix-test.watch icon indicating copy to clipboard operation
mix-test.watch copied to clipboard

Config.env() is deprecated

Open ballPointPenguin opened this issue 2 years ago • 1 comments

I'm using elixir 1.13.2

I needed this to make config :mix_test_watch ... work properly:

if config_env() == :test do
  config :mix_test_watch,
    clear: true
end

and no use Mix.Config

Maybe make a note in the README

PS It was not working for me with only :dev, I needed to specify :test. I'm not sure if that's a version-related change as well.

ballPointPenguin avatar Feb 10 '22 20:02 ballPointPenguin

I'd put it in config/dev.exs. (yes, not in config/test.exs), without the IF-statement.

I think dev is used because mix test.watch is executed in development environment by default.

config :mix_test_watch, extra_extensions: [".heex"]

tobyhinloopen avatar May 24 '22 11:05 tobyhinloopen