-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add tests for humanize (#1981)
- Loading branch information
Showing
11 changed files
with
24 additions
and
9 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
apps/web/src/components/Notification/Type/CollectNotification/Amount.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/web/src/components/Publication/Actions/Analytics/Stats.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import humanize from './humanize'; | ||
import humanize from 'utils/humanize'; | ||
|
||
/** | ||
* | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { expect, test } from '@playwright/test'; | ||
import humanize from 'utils/humanize'; | ||
|
||
test.describe('humanize', () => { | ||
test('should return comma-separated thousands', () => { | ||
expect(humanize(0)).toEqual('0'); | ||
expect(humanize(10)).toEqual('10'); | ||
expect(humanize(100)).toEqual('100'); | ||
expect(humanize(1000)).toEqual('1,000'); | ||
expect(humanize(10000)).toEqual('10,000'); | ||
expect(humanize(100000)).toEqual('100,000'); | ||
expect(humanize(1000000)).toEqual('1,000,000'); | ||
expect(humanize(123456789)).toEqual('123,456,789'); | ||
}); | ||
}); |
cda9426
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
prerender – ./apps/prerender
prerender-lenster.vercel.app
prerender.lenster.xyz
prerender-git-main-lenster.vercel.app
cda9426
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
web – ./apps/web
web-lenster.vercel.app
web-git-main-lenster.vercel.app
lenster.vercel.app
lenster.xyz
cda9426
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.