node-tdd 6.1.0 → 6.2.0

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.
@@ -176,10 +176,14 @@ export default (opts) => {
176
176
  );
177
177
  // eslint-disable-next-line no-param-reassign
178
178
  scope.filteringRequestBody = (body) => {
179
+ const idx = pendingMocks.findIndex((m) => m.idx === scopeIdx);
180
+ const record = pendingMocks[idx].record;
181
+ if (record?.body === null) {
182
+ return scope.body;
183
+ }
179
184
  if (anyFlagPresent(['magic', 'body'])) {
180
- const idx = pendingMocks.findIndex((m) => m.idx === scopeIdx);
181
185
  const requestBody = nullAsString(tryParseJson(body));
182
- updateAndRestoreModifiers(pendingMocks[idx].record, 'body', scope.body, requestBody);
186
+ updateAndRestoreModifiers(record, 'body', scope.body, requestBody);
183
187
  return scope.body;
184
188
  }
185
189
  return body;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "node-tdd",
3
3
  "type": "module",
4
- "version": "6.1.0",
4
+ "version": "6.2.0",
5
5
  "description": "Drop in extension for mocha to abstract commonly used test setups",
6
6
  "main": "lib/index.js",
7
7
  "scripts": {
@@ -41,17 +41,17 @@
41
41
  },
42
42
  "homepage": "https://github.com/blackflux/node-tdd#readme",
43
43
  "devDependencies": {
44
- "@aws-sdk/client-sqs": "3.758.0",
45
- "@babel/core": "7.26.10",
46
- "@babel/eslint-parser": "7.26.10",
47
- "@babel/register": "7.25.9",
44
+ "@aws-sdk/client-sqs": "3.821.0",
45
+ "@babel/core": "7.27.4",
46
+ "@babel/eslint-parser": "7.27.1",
47
+ "@babel/register": "7.27.1",
48
48
  "@blackflux/axios": "3.0.2",
49
49
  "@blackflux/eslint-plugin-rules": "4.0.1",
50
- "@blackflux/robo-config-plugin": "10.0.4",
50
+ "@blackflux/robo-config-plugin": "10.0.6",
51
51
  "aws-sdk-wrap": "14.0.1",
52
52
  "c8": "10.1.3",
53
53
  "chai": "5.2.0",
54
- "eslint": "9.22.0",
54
+ "eslint": "9.28.0",
55
55
  "eslint-config-airbnb-base": "15.0.0",
56
56
  "eslint-plugin-import": "2.31.0",
57
57
  "eslint-plugin-json": "4.0.1",
@@ -80,7 +80,7 @@
80
80
  "lodash.get": "4.4.2",
81
81
  "lru-cache-ext": "5.0.1",
82
82
  "minimist": "1.2.8",
83
- "nock": "14.0.1",
83
+ "nock": "14.0.5",
84
84
  "normalize-url": "2.0.1",
85
85
  "object-scan": "20.0.1",
86
86
  "smart-fs": "5.0.2",