Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mix espec.watch #306

Open
jfacoustic opened this issue Jun 23, 2022 · 2 comments
Open

mix espec.watch #306

jfacoustic opened this issue Jun 23, 2022 · 2 comments

Comments

@jfacoustic
Copy link

It would be nice to be able watch for changes in the code and automatically run the respective tests.

@antonmi
Copy link
Owner

antonmi commented Jun 27, 2022

Hey @jfacoustic !
I think 'mix espec --stale' is something similar.
Check this PR:
#292
But watching files is a good idea. If you have enthusiasm, PR are welcome!

@treble37
Copy link
Contributor

If you're building an application with ESpec, I think you can do this now with https://github.com/lpil/mix-test.watch. Just have to install the dependency and then modify config/config.exs with:

if Mix.env() == :dev do
  config :mix_test_watch,
    tasks: [
      "espec"
    ]
end

Seems to work using https://github.com/antonmi/espec_phoenix as a test application with Espec 1.9.0. Maybe we should just document the usage of this in the README instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants