Comparing version 5.2.2 to 5.2.3
@@ -9,3 +9,2 @@ import assert from 'assert'; | ||
import cloneDeep from 'lodash.clonedeep'; | ||
import isEqual from 'lodash.isequal'; | ||
import nockCommon from 'nock/lib/common.js'; | ||
@@ -26,3 +25,3 @@ import compareUrls from '../util/compare-urls.js'; | ||
} from './request-recorder/util.js'; | ||
import healBody from './request-recorder/heal-body.js'; | ||
import updateAndRestoreModifiers from './request-recorder/update-and-restore-modifiers.js'; | ||
@@ -185,5 +184,3 @@ const nockBack = nock.back; | ||
const requestBody = nullAsString(tryParseJson(body)); | ||
if (!isEqual(scope.body, requestBody)) { | ||
pendingMocks[idx].record.body = healBody(pendingMocks[idx].record.body, scope.body, requestBody); | ||
} | ||
updateAndRestoreModifiers(pendingMocks[idx].record, 'body', scope.body, requestBody); | ||
return scope.body; | ||
@@ -243,2 +240,3 @@ } | ||
if (anyFlagPresent(['magic', 'response'])) { | ||
const interceptorBody = tryParseJson(interceptor.body); | ||
const responseBody = tryParseJson([ | ||
@@ -250,7 +248,5 @@ healSqs | ||
)); | ||
if (!isEqual(interceptor.body, responseBody)) { | ||
// eslint-disable-next-line no-param-reassign | ||
interceptor.body = responseBody; | ||
pendingMocks[idx].record.response = responseBody; | ||
} | ||
updateAndRestoreModifiers(pendingMocks[idx].record, 'response', interceptorBody, responseBody); | ||
// eslint-disable-next-line no-param-reassign | ||
interceptor.body = responseBody; | ||
} | ||
@@ -257,0 +253,0 @@ |
{ | ||
"name": "node-tdd", | ||
"type": "module", | ||
"version": "5.2.2", | ||
"version": "5.2.3", | ||
"description": "Drop in extension for mocha to abstract commonly used test setups", | ||
@@ -81,3 +81,2 @@ "main": "lib/index.js", | ||
"lodash.get": "4.4.2", | ||
"lodash.isequal": "4.5.0", | ||
"lru-cache-ext": "4.0.0", | ||
@@ -84,0 +83,0 @@ "minimist": "1.2.8", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51377
13
1202
- Removedlodash.isequal@4.5.0