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: disregard whitespace in cli help text test #130

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

aral
Copy link

@aral aral commented Jan 16, 2022

Fixes #129

tests/sirv-cli.js Outdated Show resolved Hide resolved
tests/sirv-cli.js Outdated Show resolved Hide resolved
tests/sirv-cli.js Outdated Show resolved Hide resolved
@lukeed
Copy link
Owner

lukeed commented Jan 17, 2022

Hi, sorry, but can you please check the new commit on your windows machine? I was trying to set up this repo's CI to include windows but it's not worth the time/effort – I'll revisit later.

Changes are because whitespace is important & your original PR just removed everything. If this doesn't work then it should be .replace(/\r?\n/g, '\n') for both strings, since it's Windows' carriage return that's the problem.

@aral
Copy link
Author

aral commented Jan 19, 2022

Hi, sorry, but can you please check the new commit on your windows machine? I was trying to set up this repo's CI to include windows but it's not worth the time/effort – I'll revisit later.

Hey Luke, that works for me (on my Linux machine, by the way) ;)

Also, under Node 16.x, at least, I’m getting a deprecation warning for trimRight(). It also works for me using the recommended replacement, trimEnd() which looks like it was in Node since 10.x. Might be worth using that instead.

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.

sirv tests fail due to whitespace differences in terminal output on cli help test
2 participants