Skip to content

Commit

Permalink
make prettify large number tests independent of locale (#2284)
Browse files Browse the repository at this point in the history
  • Loading branch information
sighphyre committed Oct 28, 2022
1 parent c62087d commit 7e03fba
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -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 () => {
Expand Down Expand Up @@ -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 () => {
Expand Down

0 comments on commit 7e03fba

Please sign in to comment.