Fl4m3Ph03n1x
Background
So I am using this library mix-test.watch from @lpil which I really like.
Usually I just run mix test.watch and I let the process running.
As a bonus to this library, you can also execute it by passing the --only flag. For example, if I want to watch only my “super_duper_tests” I can do it like this: mix text.watch --only super_duper_tests and this will only watch all the tests that have, for example, the @moduletag :super_duper_tests on them.
Enter Alias
So, this is all fun, but I am lazy and I don’t like typing. So I want to create an alias like this:
mix test.watch.super_duper that will be translated to mix text.watch --only super_duper_tests.
To achieve this I tried the following on my mix.exs file:
defp aliases do
[
"test.watch.super_duper": ["test.watch --only super_duper_tests"]
]
end
Problem
You may have guessed, since I am posting here, that this is not working. When I try my new alias, I get the error message Could not find test.watch task.
So obviously I am doing something wrong in the configuration.
Questions
How can I create an alias for mix test.watch?
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #ai
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 1 to 7- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
hauleth
How did you defined the dependency? Are you running in correct Mix environment?
Fl4m3Ph03n1x
This is how I defined it:
Perhaps it should be:
right?
EDIT
Yep, it needed to be
[{:mix_test_watch, "~> 1.0", only: [:dev, :test]}].hauleth
BTW I prefer to use
entrorwatchmanwithmix test --listen-on-stdinFl4m3Ph03n1x
You mean:
https://github.com/alephmelo/watchman-elixir
right?
I couldn’t find any github repo for
entr, could you post a link?stefanchrobot
I personally use
watchexec:LostKobrakai
stuartbain
Blog post showing usage of
entrhttps://jvns.ca/blog/2020/06/28/entr/