Conversation
| Should we wait for a second opinion/approval? |
KhafraDev left a comment
There was a problem hiding this comment.
I don't think this is a good idea.
| @KhafraDev can you elaborate on that? |
ignoreTrailingSlashes for MockAgent | I chattet with @KhafraDev and he sent me following tweet of @mcollina https://x.com/matteocollina/status/1828802494832705896 Seems like to every issue there is a tweet by matteo :D. Anyhow: |
ignoreTrailingSlashes for MockAgentignoreTrailingSlashes to MockAgent ignoreTrailingSlashes to MockAgentignoreTrailingSlash to MockAgent
KhafraDev left a comment
There was a problem hiding this comment.
Why have it as an option on the client rather than passed in the .intercept options?
metcoder95 left a comment
There was a problem hiding this comment.
lgtm, here we can update the docs: https://github.com/nodejs/undici/blob/main/docs/docs/api/MockPool.md#mockpoolinterceptoptions
ignoreTrailingSlash to MockAgentignoreTrailingSlash to MockAgent and .intercept() | Now you can set it globally on agent level and on intercept level. |
| Shall we backport it? |
…nodejs#3655) * fix: mock interceptor should ignore trailing slashes * only normalize path if it is a string * put tests into mock-interceptors.js * make ignoreTrailingSlashes an option of MockAgent * rename to ignoreTrailingSlash * make ignoreTrailingSlashes an option of .intercept * Apply suggestions from code review * add documentation
| The backport to To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub git fetch # Create a new working tree git worktree add .worktrees/backport-v6.x v6.x # Navigate to the new working tree cd .worktrees/backport-v6.x # Create a new branch git switch --create backport-3655-to-v6.x # Cherry-pick the merged commit of this pull request and resolve the conflicts git cherry-pick -x --mainline 1 c0be359aa5b3f2b8076fbad3413a43e8406f6741 # Push it to GitHub git push --set-upstream origin backport-3655-to-v6.x # Go back to the original working tree cd ../.. # Delete the working tree git worktree remove .worktrees/backport-v6.xThen, create a pull request where the |
fixes #3649
Normalize the path in the mock interceptor