randycoulman / mix_test_interactive

Interactive watch mode for Elixir's mix test. https://hexdocs.pm/mix_test_interactive/
MIT License
73 stars 12 forks source link

Config file option to specify all/stale/failed #46

Closed bbugh closed 3 years ago

bbugh commented 3 years ago

Hi! 👋 Great tool.

Would it be possible to set the default group with a configuration file? For example:

config :mix_test_interactive, group: :stale
randycoulman commented 3 years ago

Hi @bbugh! Thanks for this idea!

There's a distinction that's not completely spelled out in the docs (yet), but is relevant here.

Configuration settings are used for controlling how mix_test_interactive behaves and remain the same the whole time the app is running.

Command-line arguments are used for two purposes:

In this case, the stale group/setting is of the latter type: it comes from the command line and is controlled by interactive mode. For that reason, it doesn't belong in the application config.

If you want mix test.interactive to start with the stale flag set by default, you can specify that on the command line:

mix test.interactive --stale

I define an alias for this in my shell:

alias mti='mix test.interactive --stale'

and then use that.