Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(intercept): handle global flags during regexp matching (#2135) #2

Merged
merged 1 commit into from
Jan 21, 2021

Conversation

uxmaster
Copy link
Owner

When matching via a regexp instance, consistently test the entire target string.
Sets the lastIndex to zero for cases where the global flag is set and the
regexp instance has been tested previously.

fixes: nock#2134

When matching via a regexp instance, consistently test the entire target string.
Sets the `lastIndex` to zero for cases where the `global` flag is set and the
regexp instance has been tested previously.

fixes: #2134
@uxmaster uxmaster merged commit e4209c2 into uxmaster:main Jan 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants