Skip to content

Cannot run test on Windows #13

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
4 tasks done
hiepxanh opened this issue Dec 14, 2024 · 3 comments
Closed
4 tasks done

Cannot run test on Windows #13

hiepxanh opened this issue Dec 14, 2024 · 3 comments
Labels
🙋 no/question This does not need any changes 👎 phase/no Post cannot or will not be acted on

Comments

@hiepxanh
Copy link

Initial checklist

Affected package

2.0.1

Steps to reproduce

  • clone
  • npm install
  • npm test

Actual behavior

test at test\index.js:468:13
✖ should work on `www-path-start` (10.3949ms)
  AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
  + actual - expected ... Lines skipped

  + '<h1>wwwtf? (3)</h1>\n' +
  +   '<p><a href="http://www.a/">www.a/</a> (space)</p>\n' +
  +   '<p><a href="http://www.a/">www.a/</a>!</p>\n' +
  +   '<p><a href="http://www.a/">www.a/</a>"</p>\n' +
  +   '<p><a href="http://www.a/#">www.a/#</a></p>\n' +
  +   '<p><a href="http://www.a/$">www.a/$</a></p>\n' +
  +   '<p><a href="http://www.a/%25">www.a/%</a></p>\n' +
  +   '<p><a href="http://www.a/&amp;">www.a/&amp;</a></p>\n' +
  +   `<p><a href="http://www.a/">www.a/</a>'</p>\n` +
  +   '<p><a href="http://www.a/(">www.a/(</a></p>\n' +
  +   '<p><a href="http://www.a/">www.a/</a>)</p>\n' +
  +   '<p><a href="http://www.a/">www.a/</a>*</p>\n' +
  +   '<p><a href="http://www.a/+">www.a/+</a></p>\n' +
  +   '<p><a href="http://www.a/">www.a/</a>,</p>\n' +
  +   '<p><a href="http://www.a/-">www.a/-</a></p>\n' +
  +   '<p><a href="http://www.a/">www.a/</a></p>\n' +
  +   '<p><a href="http://www.a/">www.a/</a>.</p>\n' +
  +   '<p><a href="http://www.a//">www.a//</a></p>\n' +
  +   '<p><a href="http://www.a/">www.a/</a>:</p>\n' +
  +   '<p><a href="http://www.a/">www.a/</a>;</p>\n' +
  +   '<p><a href="http://www.a/">www.a/</a>&lt;</p>\n' +
  +   '<p><a href="http://www.a/=">www.a/=</a></p>\n' +
  +   '<p><a href="http://www.a/%3E">www.a/></a></p>\n' +
  +   '<p><a href="http://www.a/">www.a/</a>?</p>\n' +
  +   '<p><a href="http://www.a/@">www.a/@</a></p>\n' +
  +   '<p><a href="http://www.a/%5B">www.a/[</a></p>\n' +
  ...
  - '<h1>wwwtf? (3)</h1>\r\n' +
  -   '<p><a href="http://www.a/">www.a/</a> (space)</p>\r\n' +
  -   '<p><a href="http://www.a/">www.a/</a>!</p>\r\n' +
  -   '<p><a href="http://www.a/">www.a/</a>"</p>\r\n' +
  -   '<p><a href="http://www.a/#">www.a/#</a></p>\r\n' +
  -   '<p><a href="http://www.a/$">www.a/$</a></p>\r\n' +
  -   '<p><a href="http://www.a/%25">www.a/%</a></p>\r\n' +
  -   '<p><a href="http://www.a/&amp;">www.a/&amp;</a></p>\r\n' +
  -   `<p><a href="http://www.a/">www.a/</a>'</p>\r\n` +
  -   '<p><a href="http://www.a/(">www.a/(</a></p>\r\n' +
  -   '<p><a href="http://www.a/">www.a/</a>)</p>\r\n' +
  -   '<p><a href="http://www.a/">www.a/</a>*</p>\r\n' +
  -   '<p><a href="http://www.a/+">www.a/+</a></p>\r\n' +
  -   '<p><a href="http://www.a/">www.a/</a>,</p>\r\n' +
  -   '<p><a href="http://www.a/-">www.a/-</a></p>\r\n' +
  -   '<p><a href="http://www.a/">www.a/</a></p>\r\n' +
  -   '<p><a href="http://www.a/">www.a/</a>.</p>\r\n' +
  -   '<p><a href="http://www.a//">www.a//</a></p>\r\n' +
  -   '<p><a href="http://www.a/">www.a/</a>:</p>\r\n' +
  -   '<p><a href="http://www.a/">www.a/</a>;</p>\r\n' +
  -   '<p><a href="http://www.a/">www.a/</a>&lt;</p>\r\n' +
  -   '<p><a href="http://www.a/=">www.a/=</a></p>\r\n' +
  -   '<p><a href="http://www.a/%3E">www.a/></a></p>\r\n' +
  -   '<p><a href="http://www.a/">www.a/</a>?</p>\r\n' +
  -   '<p><a href="http://www.a/@">www.a/@</a></p>\r\n' +
  -   '<p><a href="http://www.a/%5B">www.a/[</a></p>\r\n' +
  ...
      at TestContext.<anonymous> (file:///C:/Users/hiepx/small-cosmos/mdast-util-gfm-autolink-literal/test/index.js:492:14)
      at async Test.run (node:internal/test_runner/test:935:9)
      at async TestContext.<anonymous> (file:///C:/Users/hiepx/small-cosmos/mdast-util-gfm-autolink-literal/test/index.js:468:5)
      at async Test.run (node:internal/test_runner/test:935:9)
      at async Test.processPendingSubtests (node:internal/test_runner/test:633:7) {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: `<h1>wwwtf? (3)</h1>\n<p><a href="http://www.a/">www.a/</a> (space)</p>\n<p><a href="http://www.a/">www.a/</a>!</p>\n<p><a href="http://www.a/">www.a/</a>"</p>\n<p><a href="http://www.a/#">www.a/#</a></p>\n<p><a href="http://www.a/$">www.a/$</a></p>\n<p><a href="http://www.a/%25">www.a/%</a></p>\n<p><a href="http://www.a/&amp;">www.a/&amp;</a></p>\n<p><a href="http://www.a/">www.a/</a>'</p>\n<p><a href="http://www.a/(">www.a/(</a></p>\n...`,
    expected: `<h1>wwwtf? (3)</h1>\r\n<p><a href="http://www.a/">www.a/</a> (space)</p>\r\n<p><a href="http://www.a/">www.a/</a>!</p>\r\n<p><a href="http://www.a/">www.a/</a>"</p>\r\n<p><a href="http://www.a/#">www.a/#</a></p>\r\n<p><a href="http://www.a/$">www.a/$</a></p>\r\n<p><a href="http://www.a/%25">www.a/%</a></p>\r\n<p><a href="http://www.a/&amp;">www.a/&amp;</a></p>\r\n<p><a href="http://www.a/">www.a/</a>'</p>\r\n<p><a href="http://www.a/(">www.a/(</a></p>\r\n...`,
    operator: 'deepStrictEqual'
  }

Expected behavior

it should not fail default test on fresh clone. I dont understand why, feeling it should work but guest that I'm working on windows and test build on linux, so must be some whitespace or weird character cause miss behavior on this.
I'm plan to make a PR as we discuss #10 (comment)

Runtime

v22.11.0

Package manager

2.0.1

Operating system

windows 11

Build and bundle tools

other (please specify in steps to reproduce)

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Dec 14, 2024
@wooorm wooorm changed the title Cannot run test on fresh clone Cannot run test on Windows Dec 14, 2024
@wooorm
Copy link
Member

wooorm commented Dec 14, 2024

Yes, this is because of windows line endings.
Which uses \r\n instead of \n.
PR welcome to handle those

This comment has been minimized.

@wooorm wooorm added the 🙋 no/question This does not need any changes label Jan 2, 2025
Copy link

github-actions bot commented Jan 2, 2025

Hi! Thanks for reaching out! Because we treat issues as our backlog, we close issues that are questions since they don’t represent a task to be completed.

See our support docs for how and where to ask questions.

Thanks,
— bb

@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙋 no/question This does not need any changes 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

2 participants