Skip to content

Added runTests to simplify usage in interactive mode#471

Open
sporring wants to merge 2 commits intohaf:mainfrom
sporring:main
Open

Added runTests to simplify usage in interactive mode#471
sporring wants to merge 2 commits intohaf:mainfrom
sporring:main

Conversation

@sporring
Copy link
Copy Markdown

@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
Copy Markdown
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
Copy Markdown
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 No newline at end of file
Copy link
Copy Markdown
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?


/// Runs all given tests.
/// Returns 0 if all tests passed, otherwise 1
let runTests = runTestsWithCLIArgs [] [||]
Copy link
Copy Markdown
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.

3 participants