Archived
1
0

feat(http): keep slashes in queryParams in redirects (#4928)

* refactor(http): extract logic into constructRedirectPath

This allows us to easily test our redirect path construction logic where we get
the relative path, the query string and construct a redirect path.

By extracting this from `redirect`, we can easily test this logic in a unit
test.

I did this so we could test some logic where slashes in query strings should be
made human-friendly for users.

* feat(testing): add tests for constructRedirectPath

Co-authored-by: Asher <ash@coder.com>
This commit is contained in:
Joe Previte
2022-03-01 12:11:56 -07:00
committed by GitHub
parent 1465d8d510
commit 506d3f43ed
4 changed files with 67 additions and 4 deletions

View File

@ -2,6 +2,7 @@
"license": "MIT",
"#": "We must put jest in a sub-directory otherwise VS Code somehow picks up the types and generates conflicts with mocha.",
"devDependencies": {
"@jest-mock/express": "^1.4.5",
"@playwright/test": "^1.16.3",
"@types/jest": "^27.0.2",
"@types/jsdom": "^16.2.13",