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

Shell.run doesn't fail, it would be nice if it could #2313

Open
jackkoenig opened this issue Feb 27, 2024 · 2 comments
Open

Shell.run doesn't fail, it would be nice if it could #2313

jackkoenig opened this issue Feb 27, 2024 · 2 comments

Comments

@jackkoenig
Copy link

I wrote some mdoc documentation showing how to use ScalaTest with my library, and I found that mdoc does not fail when my examples fail because Shell.run does not have any way of failing--it just prints things and then returns. Suite.execute is the same way. It would be really handy if there were a normal way of running tests that reported pass/fail to the surrounding context somehow (throwing exceptions, returning Boolean, or returning Try).

@cheeseng
Copy link
Contributor

cheeseng commented Mar 5, 2024

@jackkoenig Suite's run method returns a Status, may be that will be more suitable for your use case?

@jackkoenig
Copy link
Author

@cheeseng that could work, perusing the ScalaDoc it seems to to call that I need an Args which needs a Reporter and the concrete implementations seem to be private. That seems like a decent point but does still require substantial boilerplate (just having a decent like "ConsoleReporter" would make it work pretty well).

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

2 participants