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
Allow regexp for interceptor specs. #347
Comments
👍 I think |
+1 |
👍 definitely it will be great to have function in Something like this: scope.get(function(url) {
if(match(url)) {
return {
code: 200,
body: generateBody(url)
};
} else {
//it does not handle url
return null;
}
}); or that way scope
.get(function(url) {
return match(url);
})
.reply(function(url) {
return generateBody(url);
}); |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We try to do our best, but nock is maintained by volunteers and there is only so much we can do at a time. Thank you for your contributions. |
Should this issue be open? |
Looks like it works for me. @jamestalmage @sindresorhus does this match your needs? |
Yes, thanks. For context, it was added in c303122. |
Awesome. Thanks for raising this, @mastermatt. All, this should be fixed now. |
Due to the high occurrence of
/
in paths, most people will probably use thestring
constructor form.The text was updated successfully, but these errors were encountered: