Stream: beginners

Topic: ✔ Inline Expectations


view this post on Zulip A. J. Edgar Craft (Feb 06 2024 at 17:43):

In the tutorial, I'm attempting the inline expect code example. When running roc test the response is: No expectations were found. When running roc dev I get the EXPECT FAILED in main.roc response. Are inline expects only accessible when running roc dev?

view this post on Zulip Anton (Feb 06 2024 at 17:46):

Yes, roc dev runs the code and any expects it encounters, roc test only runs top level expects.

view this post on Zulip A. J. Edgar Craft (Feb 06 2024 at 17:52):

Thank you @Anton. That is additional information that should be added to the Inline Expectation section of the tutorial.

view this post on Zulip Notification Bot (Feb 06 2024 at 17:52):

A. J. Edgar Craft has marked this topic as resolved.

view this post on Zulip Anton (Feb 06 2024 at 18:23):

That is additional information that should be added to the Inline Expectation section of the tutorial.

I'll make it happen :)

view this post on Zulip Brendan Hansknecht (Feb 06 2024 at 18:33):

I think this is a case where roc test should also catch inline expect failures

view this post on Zulip Brendan Hansknecht (Feb 06 2024 at 18:34):

Won't execute them individually like top level expects but should fail a top level expects if the top level expect causes an inline expect to fail

view this post on Zulip Anton (Feb 06 2024 at 18:37):

Hmm, yeah, I'll check if that happens

view this post on Zulip Anton (Feb 06 2024 at 18:40):

Yes it does, I'll add that to the explanation


Last updated: Jul 06 2025 at 12:14 UTC