From 0cebc65ed46a42b72ac97474ded36bec9d4222ec Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 14 Mar 2026 21:17:47 +0100 Subject: [PATCH] Bugfix/thousand separator detection test for de-CH locale (#6571) * Fix thousand separator detection for de-CH * Update changelog --- CHANGELOG.md | 4 ++++ libs/common/src/lib/helper.spec.ts | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a0e800aa..1e2cdec28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Upgraded `svgmap` from version `2.14.0` to `2.19.2` - Pinned the _Node.js_ version in the _Build code_ _GitHub Action_ to ensure environment consistency for tests +### Fixed + +- Fixed an issue with the detection of the thousand separator for the `de-CH` locale + ## 2.249.0 - 2026-03-10 ### Added diff --git a/libs/common/src/lib/helper.spec.ts b/libs/common/src/lib/helper.spec.ts index 25779cf39..2ce0bf549 100644 --- a/libs/common/src/lib/helper.spec.ts +++ b/libs/common/src/lib/helper.spec.ts @@ -25,7 +25,7 @@ describe('Helper', () => { it('Get decimal number with group (dot notation)', () => { expect( - extractNumberFromString({ locale: 'de-CH', value: '99’999.99' }) + extractNumberFromString({ locale: 'de-CH', value: `99'999.99` }) ).toEqual(99999.99); }); @@ -59,7 +59,7 @@ describe('Helper', () => { it('Get de-CH number format group when it is default', () => { languageGetter.mockReturnValue('de-CH'); - expect(getNumberFormatGroup()).toEqual('’'); + expect(getNumberFormatGroup()).toEqual(`'`); }); it('Get de-DE number format group', () => {