formatter tests
Some checks failed
Some checks failed
This commit is contained in:
26
apps/website/lib/formatters/LeagueFormatter.test.ts
Normal file
26
apps/website/lib/formatters/LeagueFormatter.test.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { LeagueFormatter } from './LeagueFormatter';
|
||||
|
||||
describe('LeagueFormatter', () => {
|
||||
describe('formatCount', () => {
|
||||
it('should format 1 league correctly', () => {
|
||||
expect(LeagueFormatter.formatCount(1)).toBe('1 league');
|
||||
});
|
||||
|
||||
it('should format 2 leagues correctly', () => {
|
||||
expect(LeagueFormatter.formatCount(2)).toBe('2 leagues');
|
||||
});
|
||||
|
||||
it('should format 0 leagues correctly', () => {
|
||||
expect(LeagueFormatter.formatCount(0)).toBe('0 leagues');
|
||||
});
|
||||
|
||||
it('should format large numbers correctly', () => {
|
||||
expect(LeagueFormatter.formatCount(100)).toBe('100 leagues');
|
||||
});
|
||||
|
||||
it('should handle negative numbers', () => {
|
||||
expect(LeagueFormatter.formatCount(-1)).toBe('-1 leagues');
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user