1
0
Fork 0

expand on readme examples, show output

This commit is contained in:
ssube 2021-07-25 12:17:23 -05:00
parent a9e9194e14
commit 0632d58d52
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
2 changed files with 19 additions and 3 deletions

View File

@ -44,9 +44,13 @@ describe('example properties', () => {
});
```
Most Mocha features, like `beforeEach` and `afterEach` hooks, work correctly within the suite defined by `over`.
Assertions can be made through `expect` (and the other chai assertions) or by returning a boolean.
You can pass additional run parameters to the fast-check Runner after the suite callback:
Note the wrapped `it` passed to the suite callback by `over`. This calls through to Mocha's `it`, after wrapping the
test in a fast-check property. Most Mocha features, like `beforeEach` and `afterEach` hooks, work correctly within
the suite defined by `over`.
You can pass additional parameters to the fast-check Runner after the suite callback:
```typescript
describe('more examples', () => {
@ -80,6 +84,18 @@ describe('more examples', () => {
});
```
The default reporter, `briefReporter`, will print the number of runs, number of shrinks, and any counterexamples
found:
```none
5) example properties
some IDs
should be a good one:
Error: Property failed by returning false after 3 runs and 8 shrinks, failing on: "00000000-a000-300d-8000-000000000000" (seed: -886543855, path: '2:0:10:0:10:0:2:3:3')
at /home/ssube/code/ssube/mocha-foam/out/src/index.js:20:385
at processTicksAndRejections (internal/process/task_queues.js:97:5)
```
## Build
To build `mocha-foam`, run `make`. The build depends on:

View File

@ -1,6 +1,6 @@
{
"name": "mocha-foam",
"version": "0.1.3",
"version": "0.1.4",
"main": "out/src/index.js",
"author": "ssube <seansube@gmail.com>",
"license": "MIT",