From 0632d58d52bbe45169f02134ef0e9d37a24b5384 Mon Sep 17 00:00:00 2001 From: ssube Date: Sun, 25 Jul 2021 12:17:23 -0500 Subject: [PATCH] expand on readme examples, show output --- README.md | 20 ++++++++++++++++++-- package.json | 2 +- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 921119a..1b8d835 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/package.json b/package.json index 7996c5e..a268d99 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mocha-foam", - "version": "0.1.3", + "version": "0.1.4", "main": "out/src/index.js", "author": "ssube ", "license": "MIT",