From 000dc78361b7df4ae1c7daecf3f5b8fc33f0b87e Mon Sep 17 00:00:00 2001 From: Jean-Marcel Belmont Date: Wed, 7 Feb 2018 14:20:42 -0500 Subject: [PATCH] Update mocking.md --- docs/mocking/mocking.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/mocking/mocking.md b/docs/mocking/mocking.md index adf361f..8858961 100644 --- a/docs/mocking/mocking.md +++ b/docs/mocking/mocking.md @@ -40,7 +40,7 @@ Test spies are useful to test both callbacks and how certain functions/methods a **Open program.test.js in `mocks-stubs-spies` folder** -####1. Stub the `retrieveDocument` function +#### 1. Stub the `retrieveDocument` function ```javascript function retrieveDocument({dbName, name}) { const couchDBName = nano.use(dbName); @@ -59,7 +59,7 @@ You don't need the implementation here but I included it here for your reference Using Sinon check that the retrieveDocument stub is called once. Make an assertion that the payload and the expected response match. -####2. Stub the `insertDocument` function. +#### 2. Stub the `insertDocument` function. ```javascript function insertDocument({ dbName = 'softwaretesting', name = 'users', body } = {}) { @@ -93,9 +93,9 @@ function insertDoc({dbName, name, body}) { * Use sinon to make some assertions about the stubbed out function * Remember to use the setup function in tape or the before block in mocha to initialize the stub. -####3. Stub out the `deleteDocument` function +#### 3. Stub out the `deleteDocument` function -######Implementation Details +###### Implementation Details ```javascript function retrieveDoc({dbName, name}) { return new Promise((resolve, reject) => {