nock
Advanced tools
Comparing version 13.0.5 to 13.0.6
@@ -419,5 +419,8 @@ 'use strict' | ||
return pattern instanceof RegExp | ||
? pattern.test(targetStr) | ||
: targetStr === String(pattern) | ||
if (pattern instanceof RegExp) { | ||
// if the regexp happens to have a global flag, we want to ensure we test the entire target | ||
pattern.lastIndex = 0 | ||
return pattern.test(targetStr) | ||
} | ||
return targetStr === String(pattern) | ||
} | ||
@@ -424,0 +427,0 @@ |
@@ -10,3 +10,3 @@ { | ||
], | ||
"version": "13.0.5", | ||
"version": "13.0.6", | ||
"author": "Pedro Teixeira <pedro.teixeira@gmail.com>", | ||
@@ -13,0 +13,0 @@ "repository": { |
173901
3400