node-tdd 3.0.5 → 3.0.6
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.
|
@@ -16,6 +16,8 @@ const nock = require('nock');
|
|
|
16
16
|
|
|
17
17
|
const cloneDeep = require('lodash.clonedeep');
|
|
18
18
|
|
|
19
|
+
const compareUrls = require('compare-urls');
|
|
20
|
+
|
|
19
21
|
const nockListener = require('./request-recorder/nock-listener');
|
|
20
22
|
|
|
21
23
|
const nockMock = require('./request-recorder/nock-mock');
|
|
@@ -156,7 +158,11 @@ module.exports = opts => {
|
|
|
156
158
|
scope.filteringPath = requestPath => {
|
|
157
159
|
if (anyFlagPresent(['magic', 'path'])) {
|
|
158
160
|
const idx = pendingMocks.findIndex(m => m.idx === scopeIdx);
|
|
159
|
-
|
|
161
|
+
|
|
162
|
+
if (!compareUrls(pendingMocks[idx].record.path, requestPath)) {
|
|
163
|
+
pendingMocks[idx].record.path = requestPath;
|
|
164
|
+
}
|
|
165
|
+
|
|
160
166
|
return scope.path;
|
|
161
167
|
}
|
|
162
168
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-tdd",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.6",
|
|
4
4
|
"description": "Drop in extension for mocha to abstract commonly used test setups",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -109,6 +109,7 @@
|
|
|
109
109
|
],
|
|
110
110
|
"dependencies": {
|
|
111
111
|
"callsites": "3.1.0",
|
|
112
|
+
"compare-urls": "2.0.0",
|
|
112
113
|
"joi-strict": "2.0.0",
|
|
113
114
|
"lodash.clonedeep": "4.5.0",
|
|
114
115
|
"lodash.get": "4.4.2",
|