Skip to content
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

redirects incorrectly computed on Windows #313

Open
jeffmcaffer opened this issue Oct 9, 2020 · 0 comments · May be fixed by #348
Open

redirects incorrectly computed on Windows #313

jeffmcaffer opened this issue Oct 9, 2020 · 0 comments · May be fixed by #348

Comments

@jeffmcaffer
Copy link
Contributor

@jeffmcaffer jeffmcaffer commented Oct 9, 2020

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

@github-actions github-actions bot added the triage label Oct 9, 2020
@github-actions github-actions bot added this to Triage in Docs team reviews Oct 9, 2020
@janiceilene janiceilene moved this from Triage to Engineering in Docs team reviews Oct 9, 2020
@janiceilene janiceilene removed the triage label Oct 9, 2020
@zeke zeke added the windows label Oct 9, 2020
@jeffmcaffer jeffmcaffer linked a pull request that will close this issue Oct 9, 2020
0 of 4 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.