mix-test.watch
mix-test.watch copied to clipboard
Ability to pass different args and use different environments for different tasks
This would be great and a lot more flexible:
# config/config.exs
use Mix.Config
if Mix.env == :dev do
config :mix_test_watch,
tasks: [
{"test", args: "--stale"},
{"dialyzer", mix_env: "dev"}
]
end
As noted in https://github.com/lpil/mix-test.watch/issues/56, the dialyzer task fails if passed unknown args. Also, the default env to run the task in is "dev" (I don't know if this matters much though).
The above API seems to make a lot of sense though and would offer a lot of flexibility.
Hello, I concur this - I run credo before my tests and I would love to specify some arguments to it while use --stale with tests as well.
Hi, I'm running in to the same issue when use with credo, and keep getting error.
Unknown switch: --stale
be able to specify which task would be awesome!
This seems to work for me:
# config/config.exs
use Mix.Config
if Mix.env == :dev do
config :mix_test_watch,
tasks: [
"test --stale",
"credo -a --strict",
]
end
The ability to run tasks under separate envs would be really nice. I have e2e tests which run in an :e2e
environment. I'm unable to run them with this module because I cannot override the env.