node-tdd 5.2.3 → 5.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -234,16 +234,16 @@ export default (opts) => {
234
234
  }
235
235
 
236
236
  if (anyFlagPresent(['magic', 'response'])) {
237
- const interceptorBody = tryParseJson(interceptor.body);
238
237
  const responseBody = tryParseJson([
239
238
  healSqs
240
239
  ].reduce(
241
240
  (respBody, fn) => fn(requestBodyString, respBody, scope, req),
242
241
  interceptor.body
243
242
  ));
244
- updateAndRestoreModifiers(pendingMocks[idx].record, 'response', interceptorBody, responseBody);
243
+ const interceptorBody = tryParseJson(interceptor.body);
245
244
  // eslint-disable-next-line no-param-reassign
246
245
  interceptor.body = responseBody;
246
+ updateAndRestoreModifiers(pendingMocks[idx].record, 'response', interceptorBody, responseBody);
247
247
  }
248
248
 
249
249
  expectedCassette.push(pendingMocks[idx].record);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "node-tdd",
3
3
  "type": "module",
4
- "version": "5.2.3",
4
+ "version": "5.2.5",
5
5
  "description": "Drop in extension for mocha to abstract commonly used test setups",
6
6
  "main": "lib/index.js",
7
7
  "scripts": {
@@ -78,7 +78,7 @@
78
78
  "joi-strict": "3.0.1",
79
79
  "lodash.clonedeep": "4.5.0",
80
80
  "lodash.get": "4.4.2",
81
- "lru-cache-ext": "4.0.0",
81
+ "lru-cache-ext": "4.1.1",
82
82
  "minimist": "1.2.8",
83
83
  "nock": "13.5.4",
84
84
  "normalize-url": "2.0.1",