Skip to content

Commit

Permalink
Windows line endings in scripts tests (aws-amplify#2059)
Browse files Browse the repository at this point in the history
* strips \r from output of api usage generator tests

* added comment to explain change

* altered comment

* adjust comment again

* another change to comment

---------

Co-authored-by: Vieltojarvi <[email protected]>
  • Loading branch information
ShadowCat567 and Vieltojarvi authored Sep 26, 2024
1 parent a8c5e08 commit 970d555
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,11 @@ void describe('Api usage generator', () => {
'samplePackageName',
apiReportAST
).generate();
assert.strictEqual(apiUsage.trim(), testCase.expectedApiUsage.trim());
assert.strictEqual(
// .replace() removes EOL differences between Windows and other OS so output matches for all
apiUsage.replace(/[\r]/g, '').trim(),
testCase.expectedApiUsage.trim()
);
});
}
});

0 comments on commit 970d555

Please sign in to comment.