test(graph-ui): fix locale-dependent number-format assertion in GraphTab.test.ts#839
Merged
Conversation
…Tab.test.ts Pin formatGraphLimitNotice to 'en-US' to resolve unit test failures under non-en_US (e.g. German de_*) locales. Fixes DeusData#825 Signed-off-by: sahil-mangla <manglasahil2017@gmail.com>
Owner
|
Thanks for the focused locale-stability fix for #825. Triage: graph UI test/UX bug, backlog priority. Review will check that pinning |
Owner
|
Thank you — this is the right fix: pinning the format to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Pins the number formatting in
formatGraphLimitNoticeto the'en-US'locale.Previously, the use of
toLocaleString()without specifying a locale caused numbers to format according to the host machine's system locale (e.g.,2.000under German locales likede-DEinstead of2,000). This caused the unit test inGraphTab.test.tsto fail on any developer machine configured with a non-en_USlocale. Explicitly pinning this to'en-US'ensures consistent, environment-independent formatting for tests and the English UI message.Fixes #825
Checklist
git commit -s) — required, CI rejects unsigned commits (DCO, see CONTRIBUTING.md)make -f Makefile.cbm test/npm run testingraph-ui)npm run buildingraph-ui)