formatter tests
Some checks failed
Some checks failed
This commit is contained in:
33
apps/website/lib/formatters/SeasonStatusFormatter.test.ts
Normal file
33
apps/website/lib/formatters/SeasonStatusFormatter.test.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { SeasonStatusFormatter } from './SeasonStatusFormatter';
|
||||
|
||||
describe('SeasonStatusFormatter', () => {
|
||||
describe('getDisplay', () => {
|
||||
it('should return correct display data for active status', () => {
|
||||
const result = SeasonStatusFormatter.getDisplay('active');
|
||||
expect(result).toEqual({
|
||||
color: 'text-performance-green',
|
||||
bg: 'bg-performance-green/10',
|
||||
label: 'Active Season',
|
||||
});
|
||||
});
|
||||
|
||||
it('should return correct display data for upcoming status', () => {
|
||||
const result = SeasonStatusFormatter.getDisplay('upcoming');
|
||||
expect(result).toEqual({
|
||||
color: 'text-warning-amber',
|
||||
bg: 'bg-warning-amber/10',
|
||||
label: 'Starting Soon',
|
||||
});
|
||||
});
|
||||
|
||||
it('should return correct display data for completed status', () => {
|
||||
const result = SeasonStatusFormatter.getDisplay('completed');
|
||||
expect(result).toEqual({
|
||||
color: 'text-gray-400',
|
||||
bg: 'bg-gray-400/10',
|
||||
label: 'Season Ended',
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user