-
Notifications
You must be signed in to change notification settings - Fork 56
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
Windows line endings in scripts tests #2059
Conversation
|
@@ -353,7 +353,10 @@ void describe('Api usage generator', () => { | |||
'samplePackageName', | |||
apiReportAST | |||
).generate(); | |||
assert.strictEqual(apiUsage.trim(), testCase.expectedApiUsage.trim()); | |||
assert.strictEqual( | |||
apiUsage.replace(/[\r]/g, '').trim(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mind adding a comment why are we doing this?
(presumably due to different EOL on windows).
Problem
Windows line endings (\r\n) would cause tests in
api_usage_generator.test.ts
to fail because the expected output would differ from the actual output due to \r character.Issue number, if available:
Changes
\r characters are now replaced with empty strings in the actual output
Corresponding docs PR, if applicable:
Validation
tests are now passing on Windows
Checklist
run-e2e
label set.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.