Skip to content

fix: disregard whitespace in cli help text test#130

Open
aral wants to merge 2 commits intolukeed:mainfrom
aral:improve-cli-help-test-resiliency
Open

fix: disregard whitespace in cli help text test#130
aral wants to merge 2 commits intolukeed:mainfrom
aral:improve-cli-help-test-resiliency

Conversation

@aral
Copy link
Copy Markdown

@aral aral commented Jan 16, 2022

Fixes #129

Comment thread tests/sirv-cli.js Outdated
Comment thread tests/sirv-cli.js Outdated
Comment thread tests/sirv-cli.js Outdated
@lukeed
Copy link
Copy Markdown
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
Copy Markdown
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