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

Compat: Make tests work on Windows with non-English locale #931

Merged
merged 1 commit into from
Oct 13, 2023

Conversation

woutervanvliet
Copy link
Contributor

Why am I submitting this PR

I originally started investigating the Broccoli problems mentioned in #684 on a Windows computer, running with some Danish locale settings. This caused a number of problems, from my editor opening bin/cli.js instead of running the code to sorting and line-ending issues with some tests.

Assuming the assertions to be the one source of truth, I've added a locale parameter in localeCompare for the default comparison function. lineEndings are set to lf for a test that checks the entire contents of a generated JSON file.

Does it fix an existing ticket?

No

Checklist

  • only relevant code is changed (make a diff before you submit the PR)
  • tests are included and pass: yarn test (see details here)
  • documentation is changed or added

@codecov-commenter
Copy link

Codecov Report

All modified lines are covered by tests ✅

Files Coverage Δ
src/helpers.js 92.39% <100.00%> (ø)

... and 1 file with indirect coverage changes

📢 Thoughts on this report? Let us know!.

@karellm karellm merged commit ba83500 into i18next:master Oct 13, 2023
4 checks passed
@woutervanvliet woutervanvliet deleted the feature/windows-compat branch October 16, 2023 07:16
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.

3 participants