53 lines
2.3 KiB
TypeScript
53 lines
2.3 KiB
TypeScript
import { describe, it, expect } from 'vitest';
|
|
import { LeagueWizardValidationMessages } from './LeagueWizardValidationMessages';
|
|
|
|
describe('LeagueWizardValidationMessages', () => {
|
|
it('should have LEAGUE_NAME_REQUIRED message', () => {
|
|
expect(LeagueWizardValidationMessages.LEAGUE_NAME_REQUIRED).toBe('League name is required');
|
|
});
|
|
|
|
it('should have LEAGUE_NAME_TOO_SHORT message', () => {
|
|
expect(LeagueWizardValidationMessages.LEAGUE_NAME_TOO_SHORT).toBe('League name must be at least 3 characters');
|
|
});
|
|
|
|
it('should have LEAGUE_NAME_TOO_LONG message', () => {
|
|
expect(LeagueWizardValidationMessages.LEAGUE_NAME_TOO_LONG).toBe('League name must be less than 100 characters');
|
|
});
|
|
|
|
it('should have DESCRIPTION_TOO_LONG message', () => {
|
|
expect(LeagueWizardValidationMessages.DESCRIPTION_TOO_LONG).toBe('Description must be less than 500 characters');
|
|
});
|
|
|
|
it('should have VISIBILITY_REQUIRED message', () => {
|
|
expect(LeagueWizardValidationMessages.VISIBILITY_REQUIRED).toBe('Visibility is required');
|
|
});
|
|
|
|
it('should have MAX_DRIVERS_INVALID_SOLO message', () => {
|
|
expect(LeagueWizardValidationMessages.MAX_DRIVERS_INVALID_SOLO).toBe('Max drivers must be greater than 0 for solo leagues');
|
|
});
|
|
|
|
it('should have MAX_DRIVERS_TOO_HIGH message', () => {
|
|
expect(LeagueWizardValidationMessages.MAX_DRIVERS_TOO_HIGH).toBe('Max drivers cannot exceed 100');
|
|
});
|
|
|
|
it('should have MAX_TEAMS_INVALID_TEAM message', () => {
|
|
expect(LeagueWizardValidationMessages.MAX_TEAMS_INVALID_TEAM).toBe('Max teams must be greater than 0 for team leagues');
|
|
});
|
|
|
|
it('should have DRIVERS_PER_TEAM_INVALID message', () => {
|
|
expect(LeagueWizardValidationMessages.DRIVERS_PER_TEAM_INVALID).toBe('Drivers per team must be greater than 0');
|
|
});
|
|
|
|
it('should have QUALIFYING_DURATION_INVALID message', () => {
|
|
expect(LeagueWizardValidationMessages.QUALIFYING_DURATION_INVALID).toBe('Qualifying duration must be greater than 0 minutes');
|
|
});
|
|
|
|
it('should have MAIN_RACE_DURATION_INVALID message', () => {
|
|
expect(LeagueWizardValidationMessages.MAIN_RACE_DURATION_INVALID).toBe('Main race duration must be greater than 0 minutes');
|
|
});
|
|
|
|
it('should have SCORING_PRESET_OR_CUSTOM_REQUIRED message', () => {
|
|
expect(LeagueWizardValidationMessages.SCORING_PRESET_OR_CUSTOM_REQUIRED).toBe('Select a scoring preset or enable custom scoring');
|
|
});
|
|
});
|