nock 15.0.0-beta.13 → 15.0.0-beta.15
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/dist/lib/common.js +5 -0
- package/package.json +1 -1
package/dist/lib/common.js
CHANGED
|
@@ -348,6 +348,9 @@ const dataEqual = (expected , actual ) => {
|
|
|
348
348
|
function deepEqual(expected , actual ) {
|
|
349
349
|
debug('deepEqual comparing', typeof expected, expected, typeof actual, actual)
|
|
350
350
|
if (expected instanceof RegExp) {
|
|
351
|
+
if (expected.global || expected.sticky) {
|
|
352
|
+
expected.lastIndex = 0
|
|
353
|
+
}
|
|
351
354
|
return expected.test(actual)
|
|
352
355
|
}
|
|
353
356
|
|
|
@@ -467,6 +470,8 @@ const expand = (input ) => {
|
|
|
467
470
|
} else {
|
|
468
471
|
resultPtr[part] = {}
|
|
469
472
|
}
|
|
473
|
+
} else if (typeof resultPtr[part] !== 'object') {
|
|
474
|
+
return undefined
|
|
470
475
|
}
|
|
471
476
|
resultPtr = resultPtr[part]
|
|
472
477
|
}
|