Skip to content

Commit

Permalink
Fix formatting in Tips.md example code
Browse files Browse the repository at this point in the history
  • Loading branch information
TarjeiSkj committed Dec 9, 2022
1 parent e61c688 commit 866a8e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/fast-check/documentation/Tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ fc.assert(
Please note that if you are using [custom examples](#add-custom-examples-next-to-generated-ones) in your tests, you will need the following implementation of `Context` in your examples:

```typescript
const exampleContext = () => fc.sample(fc.context(), {numRuns:1})[0];
const exampleContext = () => fc.sample(fc.context(), { numRuns: 1 })[0];
```

## Preview generated values
Expand Down Expand Up @@ -541,7 +541,7 @@ fc.assert(fc.property(fc.string(), fc.string(), fc.string(), myCheckFunction), {
If you are using `Context` to [log within a predicate](#log-within-a-predicate) you will need to use the following context implementation in the examples.

```typescript
const exampleContext = () => fc.sample(fc.context(), {numRuns:1})[0];
const exampleContext = () => fc.sample(fc.context(), { numRuns: 1 })[0];

fc.assert(fc.property(fc.string(), fc.string(), fc.context(), myCheckFunction), {
examples: [['', '', exampleContext()]],
Expand Down

0 comments on commit 866a8e9

Please sign in to comment.