You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 27, 2022. It is now read-only.
I haven't tested this extensively, but I'm using this library via MSW and I think I've found a fairly common use case that is not supported. Specifically, this library will not handle a url like
/api/books/:bookId.json.
Note this can be easily worked around by using the undocumented fact that a regex with capture groups will result in those captures being a part of the msw req.params object
Hey, @andrewswerlick-hmn. That's a great catch, the matching expression indeed doesn't account for file extensions. Huge thanks for submitting the pull request! I'll look at it tomorrow and we'll solve this issue together.
I haven't tested this extensively, but I'm using this library via MSW and I think I've found a fairly common use case that is not supported. Specifically, this library will not handle a url like
/api/books/:bookId.json.
In manually inspecting this file https://github.com/mswjs/node-match-path/blob/master/src/pathToRegExp.ts, I believe the problem is that line 19 does not include a "." in the list of characters to terminate the parameter match.
I'll try to submit a pull request and appropriate tests in the next day or so, but figured I'd go ahead and report the issue.
The text was updated successfully, but these errors were encountered: