node-tdd 4.1.0 → 4.1.1

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.
@@ -179,7 +179,10 @@ export default (opts) => {
179
179
  if (anyFlagPresent(['magic', 'body'])) {
180
180
  const idx = pendingMocks.findIndex((m) => m.idx === scopeIdx);
181
181
  const requestBody = tryParseJson(body);
182
- pendingMocks[idx].record.body = nullAsString(requestBody);
182
+ const requestBodyStr = nullAsString(requestBody);
183
+ if (!isEqual(scope.body, requestBodyStr)) {
184
+ pendingMocks[idx].record.body = requestBodyStr;
185
+ }
183
186
  return scope.body;
184
187
  }
185
188
  return body;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "node-tdd",
3
3
  "type": "module",
4
- "version": "4.1.0",
4
+ "version": "4.1.1",
5
5
  "description": "Drop in extension for mocha to abstract commonly used test setups",
6
6
  "main": "lib/index.js",
7
7
  "scripts": {