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

Added runTests to simplify usage in interactive mode #471

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sporring
Copy link

@sporring sporring commented Aug 4, 2023

In interactive mode, it is superfluous to give default empty parameters. Thus I propose runTests

In interactive mode, it is superfluous to give default empty parameters. Thus I propose runTests
@farlee2121
Copy link
Collaborator

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.

@haf
Copy link
Owner

haf commented Feb 13, 2024

I think it sounds like a great change!

testCase "A simple test" <| fun () ->
Expect.equal 4 (2+2) "2+2 = 4"

runTestsWithCLIArgs [] [||] simpleTest
Copy link
Collaborator

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 [] [||]
Copy link
Collaborator

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

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

Successfully merging this pull request may close these issues.

None yet

3 participants