Add current language utility unit test #106

Merged
jakob.scheid merged 17 commits from testing/current-language-util into main 2026-06-04 12:41:55 +02:00
Owner

Current language utility unit test

Add a unit test for the current language utility ( src/utils/currentLanguage.js).

Summary

  • set navigator.language (according to the test cases)
  • set local storage locale item (according to the test cases)
  • expect that result is the expected result
  • test cases for "normal" locales (e. g. en), locales with country codes (e. g. en-US), locales with writing system and country code (e. g. zh-Hans-CN) and locales with extension (e. g. en-US-u-ca-gregory)

Related issues

Closes: #83

# Current language utility unit test Add a unit test for the current language utility ( [`src/utils/currentLanguage.js`](src/src/utils/currentLanguage.js)). ## Summary - set `navigator.language` (according to the test cases) - set local storage `locale` item (according to the test cases) - expect that result is the expected result - test cases for "normal" locales (e. g. `en`), locales with country codes (e. g. `en-US`), locales with writing system and country code (e. g. `zh-Hans-CN`) and locales with extension (e. g. `en-US-u-ca-gregory`) ## Related issues Closes: #83
jakob.scheid added the area/global
type
testing
prio
high
labels 2026-06-03 20:34:18 +02:00
jakob.scheid added this to the testing-ready milestone 2026-06-03 20:34:42 +02:00
jakob.scheid added this to the MVP Frontend project 2026-06-03 20:34:44 +02:00
jakob.scheid moved this to Review in MVP Frontend on 2026-06-03 20:34:49 +02:00
johannes.vos approved these changes 2026-06-04 12:40:14 +02:00
jakob.scheid added 17 commits 2026-06-04 12:41:27 +02:00
jakob.scheid force-pushed testing/current-language-util from c42d650302 to 7d15d29409 2026-06-04 12:41:27 +02:00 Compare
jakob.scheid merged commit 072f3472f7 into main 2026-06-04 12:41:55 +02:00
jakob.scheid deleted branch testing/current-language-util 2026-06-04 12:41:55 +02:00
johannes.vos moved this to Done in MVP Frontend on 2026-06-04 13:02:48 +02:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Seekra/frontend#106