Closed GeorgeToka closed 5 months ago
Hi, @GeorgeToka. Thanks for reporting this!
The cleanUrl
function you are referencing is applied to the actual request URL. That one cannot have path parameter annotations, only the literal values of those parameters.
But the issue you are describing is possible, the root cause may just be in a different place. We need an automated test to prove that.
I've added an automated test for this in https://github.com/mswjs/msw/pull/2169, and it seems to be failing, which is good! More investigation required.
This has been released in v2.3.1!
Make sure to always update to the latest version (npm i msw@latest
) to get the newest features and bug fixes.
Predictable release automation by @ossjs/release.
@kettanaito Thanks for the quick turnaround on this one.
Scope
Improves an existing behavior
Compatibility
Feature description
There is a step that drops query parameters and it looks like it breaks the ability to specify optional URL parameters, e.g
/api/user/:id?
.The cleanup routine should be limited to removing the query parameters only.