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

lint-files test fails on Windows #318

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

lint-files test fails on Windows #318

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

Comments

@jeffmcaffer
Copy link
Contributor

@jeffmcaffer jeffmcaffer commented Oct 9, 2020

What is the current behavior?

8 of the relative URLs must start with "/" tests in tests/content/lint-files.js fail because of some windows pathing issues. Here is one example.

 FAIL  tests/content/lint-files.js (217.925 s)
  ● lint-files › in "content\actions\hosting-your-own-runners\monitoring-and-troubleshooting-self-hosted-runners.md" › relative URLs must start with "/"

    Custom message:
      Found unexpected relative article links:
      - [962]: Starting
      - [962]: Started
      - [962]: Started
      - [962]: √
      - [962]: 2020-02-11
      - [962]: 2020-02-11
      - [962]: 2020-02-11

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

    Expected: 0
    Received: 7

      178 |
      179 |         const errorMessage = formatLinkError(relativeArticleLinkErrorText, matches)
    > 180 |         expect(matches.length, errorMessage).toBe(0)
          |                                              ^
      181 |       })
      182 |
      183 |       test('URLs must not contain a hard-coded language code', async () => {

      at Object.<anonymous> (tests/content/lint-files.js:180:46)

What changes are you suggesting?

The problem is with the relative path computations near the beginning of the test. These should be wrapped with a slash call.

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
@jeffmcaffer jeffmcaffer linked a pull request that will close this issue Oct 9, 2020
0 of 4 tasks complete
@janiceilene janiceilene moved this from Triage to Engineering in Docs team reviews Oct 9, 2020
@janiceilene janiceilene added windows and removed triage labels Oct 9, 2020
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.

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