From 6acc8580a8fc5fc98d993f5975f48cf009fddebc Mon Sep 17 00:00:00 2001 From: ssube Date: Sun, 25 Jul 2021 12:22:55 -0500 Subject: [PATCH] note peer dep, async tests --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1b8d835..192e3d8 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,10 @@ An experimental Mocha BDD wrapper for fast-check. ## Install -Add `mocha-foam` to your project as a dev dependency: +Add `mocha-foam` to your project as a dev dependency, along with `fast-check`, if you are not already using it: ```shell -> yarn add -D mocha-foam +> yarn add -D fast-check mocha-foam ``` ## Usage @@ -44,7 +44,8 @@ describe('example properties', () => { }); ``` -Assertions can be made through `expect` (and the other chai assertions) or by returning a boolean. +Assertions can be made through `expect` (and the other chai assertions) or by returning a boolean, and may be `async` +functions. The test callbacks are called with a Mocha context, so [the usual caveats](https://mochajs.org/#arrow-functions) apply. 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