formatter tests
Some checks failed
Some checks failed
This commit is contained in:
36
apps/website/lib/formatters/LeagueTierFormatter.test.ts
Normal file
36
apps/website/lib/formatters/LeagueTierFormatter.test.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { LeagueTierFormatter } from './LeagueTierFormatter';
|
||||
|
||||
describe('LeagueTierFormatter', () => {
|
||||
describe('getDisplay', () => {
|
||||
it('should return correct display data for premium tier', () => {
|
||||
const result = LeagueTierFormatter.getDisplay('premium');
|
||||
expect(result).toEqual({
|
||||
color: 'text-yellow-400',
|
||||
bgColor: 'bg-yellow-500/10',
|
||||
border: 'border-yellow-500/30',
|
||||
icon: '⭐',
|
||||
});
|
||||
});
|
||||
|
||||
it('should return correct display data for standard tier', () => {
|
||||
const result = LeagueTierFormatter.getDisplay('standard');
|
||||
expect(result).toEqual({
|
||||
color: 'text-primary-blue',
|
||||
bgColor: 'bg-primary-blue/10',
|
||||
border: 'border-primary-blue/30',
|
||||
icon: '🏆',
|
||||
});
|
||||
});
|
||||
|
||||
it('should return correct display data for starter tier', () => {
|
||||
const result = LeagueTierFormatter.getDisplay('starter');
|
||||
expect(result).toEqual({
|
||||
color: 'text-gray-400',
|
||||
bgColor: 'bg-gray-500/10',
|
||||
border: 'border-gray-500/30',
|
||||
icon: '🚀',
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user