hedgehogqa / hedgehogqa/fsharp-hedgehog

Simplifying property configuration

Open
#343 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
F#
Stars
284
Forks
31
PR merge metrics
No merged PRs in 30d

Description

### Discussed in https://github.com/hedgehogqa/fsharp-hedgehog/discussions/342

Originally posted by **adam-becker** September 9, 2021
I've been skimming over the property module, and I think it needs some TLC. We have no fewer than 8 `report` methods, and I think we can probably do better here. What I was thinking is that we could maybe make combinators that allow configuring a property, something like:

```fsharp
let property = // ...
property
|> Property.withTests 500
|> Property.withRecheck seed size
|> Property.check
```

This would translate into the LINQ interface like:

```csharp
var property = // ...
property
.WithTests(500)
.WithRecheck(seed, size)
.Check();
```

I'm curious to hear thoughts on this. Apologies up front if this was suggested before.

/cc @moodmosaic @TysonMN @dharmaturtle

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.