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

Fix htmlnano tests #2532

Closed
wants to merge 3 commits into from
Closed

Fix htmlnano tests #2532

wants to merge 3 commits into from

Conversation

mischnic
Copy link
Member

↪️ Pull Request

The version upgrade in #2506 seems to have changed the output regarding collapseWhitespace. Setting that htmlnano option to all would make current tests pass, but is not always safe (see here)

✔️ PR Todo

  • Added/updated unit tests for this change
  • Filled out test instructions (In case there aren't any unit tests)
  • Included links to related issues/PRs

Copy link
Member

@DeMoorJasper DeMoorJasper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appears this doesn't fix the tests?

@mischnic
Copy link
Member Author

Appears this doesn't fix the tests?

Strange, it does locally.
Only some commits on master after the mentioned PR fail due to the additional newline, but not all.
Also, that PR shouldn't have changed anything regarding testing, the lockfile already contained that version. 🤔

@devongovett
Copy link
Member

Yeah seems like it's still failing on windows

@mischnic
Copy link
Member Author

mischnic commented Jan 17, 2019

Yeah seems like it's still failing on windows

Strange, no newline on windows:

<!doctype html><html><head><title>Test</title></head><body> <h1>Other page</h1> </body></html>

@mischnic mischnic mentioned this pull request Jan 20, 2019
3 tasks
@DeMoorJasper DeMoorJasper mentioned this pull request Jan 28, 2019
@DanielRuf
Copy link

Windows uses \r\n afaik.

@millette
Copy link

@DanielRuf
Copy link

Maybe use nodejs.org/dist/latest-v10.x/docs/api/os.html#os_os_eol in that case?

Definitely better and something what I would recommend. But this could fail in some cases but let's try it.

@mischnic
Copy link
Member Author

Definitely better and something what I would recommend. But this could fail in some cases but let's try it.

If you're running Windows, please try that out. But if I remember correctly, the output contained no linebreak at all, it really was the output in #2532 (comment).

@DanielRuf
Copy link

Will do it probably later this week, currently checking some projects and working on a few other CI fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants