1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

make prettify large number tests independent of locale (#2284)

This commit is contained in:
Simon Hornby 2022-10-28 14:47:44 +02:00 committed by GitHub
parent c62087d035
commit 7e03fba6cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,7 @@ describe('PrettifyLargeNumber', () => {
LARGE_NUMBER_PRETTIFIED
);
expect(prettifiedText.textContent).toBe('999,999');
expect(prettifiedText.textContent).toHaveLength('999,999'.length);
});
it('should render prettified number for value equal to the threshold', async () => {
@ -41,7 +41,9 @@ describe('PrettifyLargeNumber', () => {
LARGE_NUMBER_PRETTIFIED
);
expect(prettifiedText.getAttribute('aria-label')).toBe('12,345,678');
expect(prettifiedText.getAttribute('aria-label')).toHaveLength(
'12,345,678'.length
);
});
it('should render prettified number with provided significant figures for value greater than threshold', async () => {