cri.dev
about posts rss

elixir mix test --stale --listen-to-stdin

Published on
Tagged with elixir16 mix1 test2

Today I found out how to run your tests in a --watch fashion, with Elixir and Mix.

Looking through the documentation for Mix.Task.Test you’ll find the --stale option and --listen-on-stdin.

From the documentation for --stale

The --stale command line option attempts to run only the test files which reference modules that have changed since the last time you ran this task with --stale.

--listen-on-stdin runs tests, and then listens on stdin. It will re-run tests once a newline is received

Here, have a slice of pizza 🍕