Skip to content

Cannot run test on Windows #13

Closed
Closed
@hiepxanh

Description

@hiepxanh

Initial checklist

  • I read the support docs
    I read the contributing guide
    I agree to follow the code of conduct
    I searched issues and discussions and couldn’t find anything (or linked relevant results below)

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)

Activity

added
👋 phase/newPost is being triaged automatically
🤞 phase/openPost is being triaged manually
and removed
👋 phase/newPost is being triaged automatically
on Dec 14, 2024
changed the title [-]Cannot run test on fresh clone[/-] [+]Cannot run test on Windows[/+] on Dec 14, 2024
wooorm

wooorm commented on Dec 14, 2024

@wooorm
Member

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

github-actions

github-actions commented on Dec 16, 2024

@github-actions
github-actions

github-actions commented on Jan 2, 2025

@github-actions

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

added
👎 phase/noPost cannot or will not be acted on
and removed
🤞 phase/openPost is being triaged manually
on Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    👎 phase/noPost cannot or will not be acted on🙋 no/questionThis does not need any changes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @wooorm@hiepxanh

        Issue actions

          Cannot run test on Windows · Issue #13 · syntax-tree/mdast-util-gfm-autolink-literal