roc test prints "No expectations were found." and returns with exit code 2 if the provided Roc file did not contain any tests. This is pretty annoying in CI contexts where you want to test all expects in all Roc files. It's non-trivial to avoid false positives when checking if a file contains a top level expect with grep for example.
So I propose we change the returned exit code to 0 but still print "No expectations were found.".
so the motivation for this was wanting to prevent the scenario where you think all your tests are passing, but it's actually because you're running roc test in the wrong directory or something
regarding testing all expect s in all .roc files, I'd like to have roc test run all top level expects not just for the given .roc file, but also all the ones it imports (recursively)
so that way you should be able to run roc test and have it run all the tests in your project
would that address this use case?
That would work, but not for any roc files in e.g. an examples folder.
Also, you can match on CI for 0 or 2. Just like with roc check. 2 is our warning exit code
But yeah, less convenient but for a solid purpose
Oh, also, roc test is already recursive over imports
I like the idea of trying that out!
Sorry, trying what out exactly?
checking for exit code 2 in CI
:+1: I'm setting it up like that in basic-cli
nice, sounds good!
Last updated: Jun 16 2026 at 16:19 UTC