Skip to content

redirects incorrectly computed on Windows #313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jeffmcaffer opened this issue Oct 9, 2020 · 0 comments
Closed

redirects incorrectly computed on Windows #313

jeffmcaffer opened this issue Oct 9, 2020 · 0 comments
Labels
bug An error or flaw that causes unintended or unexpected results engineering Will involve Docs Engineering

Comments

@jeffmcaffer
Copy link
Contributor

Redirect computation fails in some cases on Windows.

What is the current behavior?

npm test results the following error. i've not tracked it down yet but inevitably it will be a path.join problem

 FAIL  tests/routing/deprecated-enterprise-versions.js (71.257 s)
  ● enterprise deprecation › workaround for lost frontmatter redirects works in deprecated enterprise content >=2.13

    expect(received).toBe(expected) // Object.is equality

    Expected: "/en/enterprise/2.15/user/articles/viewing-contributions-on-your-profile"
    Received: "%5Cen%5Centerprise%5C2.15%5Cuser%5Carticles%5Cviewing-contributions-on-your-profile"

      28 |     const res = await get('/en/enterprise/2.15/user/articles/viewing-contributions-on-your-profile-page')
      29 |     expect(res.statusCode).toBe(301)
    > 30 |     expect(res.headers.location).toBe('/en/enterprise/2.15/user/articles/viewing-contributions-on-your-profile')
         |                                  ^
      31 |   })
      32 |
      33 |   test('handles requests for deprecated Enterprise pages ( >=2.13 )', async () => {

      at Object.<anonymous> (tests/routing/deprecated-enterprise-versions.js:30:34)

What changes are you suggesting?

likely should just wrap the join call with a call to slash

cc: @github/docs-engineering , @chiedo

@jeffmcaffer jeffmcaffer added bug An error or flaw that causes unintended or unexpected results engineering Will involve Docs Engineering labels Oct 9, 2020
@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Oct 9, 2020
@janiceilene janiceilene removed the triage Do not begin working on this issue until triaged by the team label Oct 9, 2020
@zeke zeke added the windows label Oct 9, 2020
@chiedo chiedo closed this as completed Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error or flaw that causes unintended or unexpected results engineering Will involve Docs Engineering
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants