Skip to content

Easier way to watch test + files for changes? #19343

Discussion options

You must be logged in to vote

Is there a way to run all tests in a project and re-run when a file changes?

No, v watch monitors the files used by a single program currently, while v test runs many (all found _test.v files), and currently can not report back to v watch what files were needed for all found test files.

If your project has a single _test.v file however, it is a single program, even if it has many test functions in it, and you can run it without v test with:
v watch -c src/lexer/lexer_test.v .

It is a good idea for a future v test enhancement, so that v watch -c test . could work, without more flags needed.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@danawoodman
Comment options

Answer selected by danawoodman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants