Dynamic paths #2416
Unanswered
BrunoQuaresma
asked this question in
Q&A
Dynamic paths
#2416
Replies: 1 comment
-
This is related to my feature request #2333 unfortunately, I never heard any feedback from the maintainers |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi folks, I'm migrating some tests from
msw
to use nock but I'm kinda stuck on how to make nock work with dynamic paths likeusers/:username
and/users/:username/workspace/:workspaceName
.I tried the RegExp:
/users\/(.*)/
/users\/(.*)\/workspace\/(.*)/
But unfortunately, requests like
/users/bruno-quaresma/workspace/dev
are getting hit by/users\/(.*)/
. I'm kinda bad on Regex but I would appreciate the help. I'm also wondering if there is a way to make it easier when using nock.Beta Was this translation helpful? Give feedback.
All reactions