Skip to content

Commit

Permalink
Show number of tests and stamps on fscheck test pass
Browse files Browse the repository at this point in the history
  • Loading branch information
rynoV committed Dec 17, 2024
1 parent ae8a68e commit 40cbf98
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 5 additions & 1 deletion Expecto.FsCheck/FsCheck.fs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ module ExpectoFsCheck =
| xs -> sprintf "%s\n" (String.concat "\n" xs)

match testResult with
| TestResult.True (_testData,_b) -> ()
| TestResult.True (data,suppressOutput) ->
if not suppressOutput then
$"Passed {numTests data.NumberOfTests}.\n{stampsToString data.Stamps}"
|> PassWithMessage
|> raise

| TestResult.False (_,_,_, Outcome.Exception (:? IgnoreException as e),_) ->
raise e
Expand Down
5 changes: 3 additions & 2 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
### 11.0.0-alpha4 - 2024-12-16
* Allow quietOnSuccess and maxRejected fscheck config
* Tests can now pass with a message
* `TestPrinters` now has a new field `passedWithMessage` which may need to be implemented for custom printers
* `TestPrinters` now has a new field `passedWithMessage` which may need to be implemented for custom printers
* Allow quietOnSuccess and maxRejected fscheck config
* When `quietOnSuccess` is false, the number of tests and stamps (`Prop.collect/classify/trivial` etc) will be shown when the test passes.

### 11.0.0-alpha3 - 2024-10-13
* Add testParamAsync and testParamTask (#512), thanks @1eyewonder
Expand Down

0 comments on commit 40cbf98

Please sign in to comment.