microsoft / microsoft/vscode-documentdb

Audit existing tests for locale-sensitive string assertions

Open
#764 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.