randycoulman / mix_test_interactive

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

focus mode #88

Open mattwynne opened 3 weeks ago

mattwynne commented 3 weeks ago

when fixing a bunch of failing tests, it would be handy to put the runner into "focus mode" where it just picks one of the failing tests, pattern-matches on that one until it passes, then picks another one, until all of them are passing.

randycoulman commented 3 weeks ago

Thanks for the suggestion, @mattwynne! I can see that being handy in certain cases for sure.

I'm not quite sure how we'd implement that one, though. mix_test_interactive doesn't really know anything about the results of running the tests, as it delegates all of that responsibility to ExUnit. So it would be difficult for it to figure out what pattern to use.

The best I can suggest for now is to use the f key to run only failing tests (equivalent of mix test --failed). I realize that's not quite what you're looking for when there are a lot of failing tests, though.

I'll leave this issue open for a bit in case someone has a good idea for how to implement this.