-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Added runTests to simplify usage in interactive mode #471
base: main
Are you sure you want to change the base?
Conversation
In interactive mode, it is superfluous to give default empty parameters. Thus I propose runTests
This is something that caused me to double take when I first started with the library. I feel like this is a fairly high-traffic API decision though, and @haf should have the final call. |
I think it sounds like a great change! |
testCase "A simple test" <| fun () -> | ||
Expect.equal 4 (2+2) "2+2 = 4" | ||
|
||
runTestsWithCLIArgs [] [||] simpleTest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sporring Could you clarify the motivation of these fsx files?
@@ -633,6 +633,10 @@ module Tests = | |||
let runTestsWithCLIArgs cliArgs args tests = | |||
runTestsWithCLIArgsAndCancel CancellationToken.None cliArgs args tests | |||
|
|||
/// Runs all given tests. | |||
/// Returns 0 if all tests passed, otherwise 1 | |||
let runTests = runTestsWithCLIArgs [] [||] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also document this in the ReadMe
In interactive mode, it is superfluous to give default empty parameters. Thus I propose runTests