Skip to content

Commit 7ee55e3

Browse files
fix: make formatNumber test resilient to ICU version differences
The de-CH locale thousands separator character varies across ICU versions (U+2019 in ICU 77, different in ICU 78.2). Use a regex match instead of exact codepoint comparison. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 2bd16f7 commit 7ee55e3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/twenty-front/src/utils/format/__tests__/formatNumber.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ describe('formatNumber', () => {
5757
format: NumberFormat.APOSTROPHE_AND_DOT,
5858
decimals: 2,
5959
}),
60-
).toEqual(
61-
'1\u2019234.56', // Uses right single quotation mark (U+2019)
62-
);
60+
).toMatch(/^1['\u2018\u2019\u02BC]234\.56$/);
6361
});
6462
});
6563
describe('with abbreviate', () => {

0 commit comments

Comments
 (0)