microsoft / microsoft/vscode-documentdb
Audit existing tests for locale-sensitive string assertions
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 31
- Forks
- 22
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 21
Description
Follow-up from #763.
When fixing selectivity display formatting we found that some tests were asserting locale-specific strings (e.g. "5.0%", "0.1%") that would fail on systems with a non-en-US default locale.
Task: audit the test suite for other places where numeric or date strings are asserted as hard-coded literals and update them to either:
- compute the expected value using the same locale-aware call as production code, or
- pin the locale explicitly in the test setup.
Look especially for toFixed, toLocaleString, Intl.NumberFormat, and date formatting.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by searching the test suite for hard-coded numeric or date strings and uses of toFixed, toLocaleString, and Intl.NumberFormat. Compare each assertion with the locale-aware production call, then run the affected tests and confirm all relevant assertions either compute expected values consistently or pin the locale explicitly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- internationalization, testing-qa
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100