63 lines
2.0 KiB
TypeScript
63 lines
2.0 KiB
TypeScript
import { describe, it, expect } from 'vitest';
|
|
import { StatusFormatter } from './StatusFormatter';
|
|
|
|
describe('StatusFormatter', () => {
|
|
describe('transactionStatus', () => {
|
|
it('should format "paid" correctly', () => {
|
|
expect(StatusFormatter.transactionStatus('paid')).toBe('Paid');
|
|
});
|
|
|
|
it('should format "pending" correctly', () => {
|
|
expect(StatusFormatter.transactionStatus('pending')).toBe('Pending');
|
|
});
|
|
|
|
it('should format "overdue" correctly', () => {
|
|
expect(StatusFormatter.transactionStatus('overdue')).toBe('Overdue');
|
|
});
|
|
|
|
it('should format "failed" correctly', () => {
|
|
expect(StatusFormatter.transactionStatus('failed')).toBe('Failed');
|
|
});
|
|
|
|
it('should handle unknown status', () => {
|
|
expect(StatusFormatter.transactionStatus('unknown')).toBe('unknown');
|
|
});
|
|
});
|
|
|
|
describe('raceStatus', () => {
|
|
it('should format "scheduled" correctly', () => {
|
|
expect(StatusFormatter.raceStatus('scheduled')).toBe('Scheduled');
|
|
});
|
|
|
|
it('should format "running" correctly', () => {
|
|
expect(StatusFormatter.raceStatus('running')).toBe('Live');
|
|
});
|
|
|
|
it('should format "completed" correctly', () => {
|
|
expect(StatusFormatter.raceStatus('completed')).toBe('Completed');
|
|
});
|
|
|
|
it('should handle unknown status', () => {
|
|
expect(StatusFormatter.raceStatus('unknown')).toBe('unknown');
|
|
});
|
|
});
|
|
|
|
describe('protestStatus', () => {
|
|
it('should format "pending" correctly', () => {
|
|
expect(StatusFormatter.protestStatus('pending')).toBe('Pending');
|
|
});
|
|
|
|
it('should format "under_review" correctly', () => {
|
|
expect(StatusFormatter.protestStatus('under_review')).toBe('Under Review');
|
|
});
|
|
|
|
it('should format "resolved" correctly', () => {
|
|
expect(StatusFormatter.protestStatus('resolved')).toBe('Resolved');
|
|
});
|
|
|
|
it('should handle unknown status', () => {
|
|
expect(StatusFormatter.protestStatus('unknown')).toBe('unknown');
|
|
});
|
|
});
|
|
});
|