test(graph-ui): fix locale-dependent number-format assertion in GraphTab.test.ts
What does this PR do?
Pins the number formatting in formatGraphLimitNotice to 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.000 under German locales like de-DE instead of 2,000). This caused the unit test in GraphTab.test.ts to fail on any developer machine configured with a non-en_US locale. Explicitly pinning this to 'en-US' ensures consistent, environment-independent formatting for tests and the English UI message.
Fixes #825
Checklist
- [x] Every commit is signed off (
git commit -s) — required, CI rejects unsigned commits (DCO, see CONTRIBUTING.md) - [x] Tests pass locally (
make -f Makefile.cbm test/npm run testingraph-ui) - [x] Lint/Build passes (
npm run buildingraph-ui) - [x] New behavior is covered by a test (reproduce-first for bug fixes)
Thanks for the focused locale-stability fix for #825. Triage: graph UI test/UX bug, backlog priority.
Review will check that pinning en-US is intentional for this English UI notice, and that the test remains stable on non-English developer machines without masking future i18n work. This looks nicely scoped.
Thank you — this is the right fix: pinning the format to toLocaleString("en-US") in the component makes the count deterministic regardless of the viewer's host locale, rather than just patching the test assertion. The surrounding notice is English-only so the digit grouping stays consistent. Merged as 093eaf17; closes #825. Appreciated!