do to formatters
This commit is contained in:
22
apps/website/lib/formatters/DashboardRankFormatter.test.ts
Normal file
22
apps/website/lib/formatters/DashboardRankFormatter.test.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { DashboardRankDisplay } from './DashboardRankFormatter';
|
||||
|
||||
describe('DashboardRankDisplay', () => {
|
||||
describe('happy paths', () => {
|
||||
it('should format rank correctly', () => {
|
||||
expect(DashboardRankDisplay.format(1)).toBe('1');
|
||||
expect(DashboardRankDisplay.format(42)).toBe('42');
|
||||
expect(DashboardRankDisplay.format(100)).toBe('100');
|
||||
});
|
||||
});
|
||||
|
||||
describe('edge cases', () => {
|
||||
it('should handle rank 0', () => {
|
||||
expect(DashboardRankDisplay.format(0)).toBe('0');
|
||||
});
|
||||
|
||||
it('should handle large ranks', () => {
|
||||
expect(DashboardRankDisplay.format(999999)).toBe('999999');
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user