node-tdd 4.1.0 → 5.0.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.
- package/lib/modules/request-recorder.js +4 -1
- package/package.json +17 -17
|
@@ -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
|
-
|
|
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
|
+
"version": "5.0.0",
|
|
5
5
|
"description": "Drop in extension for mocha to abstract commonly used test setups",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"scripts": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"clean": "rm -rf lib",
|
|
10
10
|
"build": "cp -rf ./src ./lib",
|
|
11
11
|
"build-clean": "yarn run clean && yarn run build",
|
|
12
|
-
"test-simple": "c8 mocha --
|
|
12
|
+
"test-simple": "c8 mocha --import=./test/reg.js \"./test/**/*.spec.js\"",
|
|
13
13
|
"docker": "docker run --net host -u`id -u`:`id -g` -v $(pwd):/user/project -v ~/.aws:/user/.aws -v ~/.npmrc:/user/.npmrc -w /user/project -it --entrypoint /bin/bash",
|
|
14
14
|
"t": "yarn test",
|
|
15
15
|
"ts": "yarn run test-simple",
|
|
@@ -41,22 +41,22 @@
|
|
|
41
41
|
},
|
|
42
42
|
"homepage": "https://github.com/blackflux/node-tdd#readme",
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@aws-sdk/client-sqs": "3.
|
|
45
|
-
"@babel/core": "7.
|
|
46
|
-
"@babel/eslint-parser": "7.23.
|
|
47
|
-
"@babel/register": "7.
|
|
44
|
+
"@aws-sdk/client-sqs": "3.523.0",
|
|
45
|
+
"@babel/core": "7.24.0",
|
|
46
|
+
"@babel/eslint-parser": "7.23.10",
|
|
47
|
+
"@babel/register": "7.23.7",
|
|
48
48
|
"@blackflux/eslint-plugin-rules": "3.0.1",
|
|
49
|
-
"@blackflux/robo-config-plugin": "9.2
|
|
50
|
-
"aws-sdk-wrap": "13.1
|
|
51
|
-
"axios": "1.6.
|
|
52
|
-
"c8": "
|
|
53
|
-
"chai": "
|
|
54
|
-
"eslint": "8.
|
|
49
|
+
"@blackflux/robo-config-plugin": "9.3.2",
|
|
50
|
+
"aws-sdk-wrap": "13.2.1",
|
|
51
|
+
"axios": "1.6.7",
|
|
52
|
+
"c8": "9.1.0",
|
|
53
|
+
"chai": "5.1.0",
|
|
54
|
+
"eslint": "8.57.0",
|
|
55
55
|
"eslint-config-airbnb-base": "15.0.0",
|
|
56
|
-
"eslint-plugin-import": "2.29.
|
|
56
|
+
"eslint-plugin-import": "2.29.1",
|
|
57
57
|
"eslint-plugin-json": "3.1.0",
|
|
58
58
|
"eslint-plugin-markdown": "3.0.1",
|
|
59
|
-
"eslint-plugin-mocha": "10.
|
|
59
|
+
"eslint-plugin-mocha": "10.3.0",
|
|
60
60
|
"fancy-log": "2.0.0",
|
|
61
61
|
"js-gardener": "5.0.4",
|
|
62
62
|
"lambda-monitor-logger": "5.0.1"
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
}
|
|
69
69
|
],
|
|
70
70
|
"engines": {
|
|
71
|
-
"node": ">=
|
|
71
|
+
"node": ">= 18"
|
|
72
72
|
},
|
|
73
73
|
"files": [
|
|
74
74
|
"lib"
|
|
@@ -81,12 +81,12 @@
|
|
|
81
81
|
"lodash.isequal": "4.5.0",
|
|
82
82
|
"lru-cache-ext": "4.0.0",
|
|
83
83
|
"minimist": "1.2.8",
|
|
84
|
-
"nock": "13.4
|
|
84
|
+
"nock": "13.5.4",
|
|
85
85
|
"normalize-url": "2.0.1",
|
|
86
86
|
"object-scan": "19.0.5",
|
|
87
87
|
"smart-fs": "4.0.1",
|
|
88
88
|
"timekeeper": "2.3.1",
|
|
89
|
-
"tmp": "0.2.
|
|
89
|
+
"tmp": "0.2.3",
|
|
90
90
|
"xml2js": "0.6.2"
|
|
91
91
|
}
|
|
92
92
|
}
|