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

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

lint-files test fails on Windows #318

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

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

@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 added windows and removed triage Do not begin working on this issue until triaged by the team labels 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.

3 participants