Closed georgehb closed 3 years ago
There is an instanceof RegExp check used in convertRegExpToProxy. This doesn't work in jest which runs each test in a separate execution context.
instanceof RegExp
convertRegExpToProxy
Changing this check to Object.prototype.toString.call(o) !== "[object RegExp]" should fix the issue.
Object.prototype.toString.call(o) !== "[object RegExp]"
There is an
instanceof RegExp
check used inconvertRegExpToProxy
. This doesn't work in jest which runs each test in a separate execution context.Changing this check to
Object.prototype.toString.call(o) !== "[object RegExp]"
should fix the issue.