website refactor
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { CarId } from './CarId';
|
||||
|
||||
describe('CarId', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
|
||||
export class CarId implements ValueObject<string> {
|
||||
private constructor(private readonly value: string) {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { CountryCode } from './CountryCode';
|
||||
|
||||
describe('CountryCode', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
|
||||
export class CountryCode implements ValueObject<string> {
|
||||
private constructor(private readonly value: string) {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { DecalOverride } from './DecalOverride';
|
||||
|
||||
describe('DecalOverride', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
|
||||
export interface DecalOverrideProps {
|
||||
leagueId: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { GameConstraints } from './GameConstraints';
|
||||
|
||||
const sampleConstraints = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { ImageUrl } from './ImageUrl';
|
||||
|
||||
describe('ImageUrl', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
|
||||
export class ImageUrl implements ValueObject<string> {
|
||||
private constructor(private readonly value: string) {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { JoinedAt } from './JoinedAt';
|
||||
|
||||
describe('JoinedAt', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
|
||||
export class JoinedAt implements ValueObject<Date> {
|
||||
private constructor(private readonly value: Date) {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { LeagueDescription } from './LeagueDescription';
|
||||
|
||||
describe('LeagueDescription', () => {
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
* Represents a valid league description with validation rules.
|
||||
*/
|
||||
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
|
||||
export interface LeagueDescriptionValidationResult {
|
||||
valid: boolean;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { LeagueName } from './LeagueName';
|
||||
|
||||
describe('LeagueName', () => {
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
* Represents a valid league name with validation rules.
|
||||
*/
|
||||
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
|
||||
export interface LeagueNameValidationResult {
|
||||
valid: boolean;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { LeagueTimezone } from './LeagueTimezone';
|
||||
|
||||
describe('LeagueTimezone', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
|
||||
export interface LeagueTimezoneProps {
|
||||
id: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { LeagueVisibility } from './LeagueVisibility';
|
||||
|
||||
describe('LeagueVisibility', () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { LiveryDecal } from './LiveryDecal';
|
||||
|
||||
describe('LiveryDecal', () => {
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* Represents a decal/logo placed on a livery
|
||||
*/
|
||||
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
|
||||
export type DecalType = 'sponsor' | 'user';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { MembershipFee } from './MembershipFee';
|
||||
import { Money } from './Money';
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
|
||||
import type { Money } from './Money';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import type { Money } from './Money';
|
||||
|
||||
export type MembershipFeeType = 'season' | 'monthly' | 'per_race';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { Money } from './Money';
|
||||
|
||||
describe('Money', () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { MonthlyRecurrencePattern } from './MonthlyRecurrencePattern';
|
||||
|
||||
describe('MonthlyRecurrencePattern', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import { ALL_WEEKDAYS } from '../types/Weekday';
|
||||
import type { Weekday } from '../types/Weekday';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { Weekday } from '../types/Weekday';
|
||||
import { ALL_WEEKDAYS } from '../types/Weekday';
|
||||
|
||||
export interface MonthlyRecurrencePatternProps {
|
||||
ordinal: 1 | 2 | 3 | 4;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { Points } from './Points';
|
||||
|
||||
describe('Points', () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { PointsTable } from './PointsTable';
|
||||
|
||||
describe('PointsTable', () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { RaceIncidents, type IncidentRecord } from './RaceIncidents';
|
||||
|
||||
describe('RaceIncidents', () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { RaceName } from './RaceName';
|
||||
|
||||
describe('RaceName', () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { RaceStatus, type RaceStatusValue } from './RaceStatus';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import { RaceStatus, type RaceStatusValue } from './RaceStatus';
|
||||
|
||||
describe('RaceStatus', () => {
|
||||
it('creates a status and exposes stable value/toString/props', () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { RaceTimeOfDay } from './RaceTimeOfDay';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import { RaceTimeOfDay } from './RaceTimeOfDay';
|
||||
|
||||
describe('RaceTimeOfDay', () => {
|
||||
it('should create valid time', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
|
||||
export interface RaceTimeOfDayProps {
|
||||
hour: number;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { IRacingId } from './RacingId';
|
||||
|
||||
describe('IRacingId', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
|
||||
export class IRacingId implements ValueObject<string> {
|
||||
private constructor(private readonly value: string) {}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { MonthlyRecurrencePattern } from './MonthlyRecurrencePattern';
|
||||
import { RecurrenceStrategy } from './RecurrenceStrategy';
|
||||
import { WeekdaySet } from './WeekdaySet';
|
||||
import { MonthlyRecurrencePattern } from './MonthlyRecurrencePattern';
|
||||
|
||||
describe('RecurrenceStrategy', () => {
|
||||
describe('weekly', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { WeekdaySet } from './WeekdaySet';
|
||||
import { MonthlyRecurrencePattern } from './MonthlyRecurrencePattern';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import { MonthlyRecurrencePattern } from './MonthlyRecurrencePattern';
|
||||
import { WeekdaySet } from './WeekdaySet';
|
||||
|
||||
export type WeeklyRecurrenceStrategyProps = {
|
||||
kind: 'weekly';
|
||||
@@ -84,4 +84,4 @@ export class RecurrenceStrategy implements ValueObject<RecurrenceStrategyProps>
|
||||
}
|
||||
}
|
||||
|
||||
export { RecurrenceStrategyFactory } from './RecurrenceStrategyFactory';
|
||||
export { RecurrenceStrategyFactory } from './RecurrenceStrategyFactory';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import * as mod from '@core/racing/domain/value-objects/RecurrenceStrategyFactory';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
describe('racing/domain/value-objects/RecurrenceStrategyFactory.ts', () => {
|
||||
it('imports', () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { WeekdaySet } from './WeekdaySet';
|
||||
import { MonthlyRecurrencePattern } from './MonthlyRecurrencePattern';
|
||||
import { RecurrenceStrategy } from './RecurrenceStrategy';
|
||||
import { WeekdaySet } from './WeekdaySet';
|
||||
|
||||
export class RecurrenceStrategyFactory {
|
||||
static weekly(weekdays: WeekdaySet): RecurrenceStrategy {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { ScheduledRaceSlot } from './ScheduledRaceSlot';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { LeagueTimezone } from './LeagueTimezone';
|
||||
import { ScheduledRaceSlot } from './ScheduledRaceSlot';
|
||||
|
||||
describe('ScheduledRaceSlot', () => {
|
||||
it('should create scheduled race slot', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { LeagueTimezone } from './LeagueTimezone';
|
||||
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
|
||||
export interface ScheduledRaceSlotProps {
|
||||
roundNumber: number;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import {
|
||||
RacingDomainValidationError,
|
||||
RacingDomainValidationError,
|
||||
} from '../errors/RacingDomainError';
|
||||
import {
|
||||
SeasonDropPolicy,
|
||||
type SeasonDropStrategy,
|
||||
SeasonDropPolicy,
|
||||
type SeasonDropStrategy,
|
||||
} from './SeasonDropPolicy';
|
||||
|
||||
describe('SeasonDropPolicy', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
|
||||
export type SeasonDropStrategy = 'none' | 'bestNResults' | 'dropWorstN';
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import {
|
||||
RacingDomainValidationError,
|
||||
RacingDomainValidationError,
|
||||
} from '../errors/RacingDomainError';
|
||||
|
||||
import { SeasonSchedule } from './SeasonSchedule';
|
||||
import { RaceTimeOfDay } from './RaceTimeOfDay';
|
||||
import { LeagueTimezone } from './LeagueTimezone';
|
||||
import { RecurrenceStrategyFactory } from './RecurrenceStrategy';
|
||||
import { WeekdaySet } from './WeekdaySet';
|
||||
import { MonthlyRecurrencePattern } from './MonthlyRecurrencePattern';
|
||||
import { RaceTimeOfDay } from './RaceTimeOfDay';
|
||||
import { RecurrenceStrategyFactory } from './RecurrenceStrategy';
|
||||
import { SeasonSchedule } from './SeasonSchedule';
|
||||
import { WeekdaySet } from './WeekdaySet';
|
||||
|
||||
describe('SeasonSchedule', () => {
|
||||
const timeOfDay = RaceTimeOfDay.fromString('20:00');
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { RaceTimeOfDay } from './RaceTimeOfDay';
|
||||
import { LeagueTimezone } from './LeagueTimezone';
|
||||
import type { RecurrenceStrategy } from './RecurrenceStrategy';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import { LeagueTimezone } from './LeagueTimezone';
|
||||
import { RaceTimeOfDay } from './RaceTimeOfDay';
|
||||
import type { RecurrenceStrategy } from './RecurrenceStrategy';
|
||||
|
||||
export interface SeasonScheduleProps {
|
||||
startDate: Date;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import {
|
||||
RacingDomainValidationError,
|
||||
RacingDomainValidationError,
|
||||
} from '../errors/RacingDomainError';
|
||||
|
||||
import { SeasonScoringConfig } from './SeasonScoringConfig';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
|
||||
/**
|
||||
* Value Object: SeasonScoringConfig
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import {
|
||||
RacingDomainValidationError,
|
||||
RacingDomainValidationError,
|
||||
} from '../errors/RacingDomainError';
|
||||
|
||||
import { SeasonStewardingConfig } from './SeasonStewardingConfig';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import type { StewardingDecisionMode } from '../entities/League';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
|
||||
export interface SeasonStewardingConfigProps {
|
||||
decisionMode: StewardingDecisionMode;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { SessionType, type SessionTypeValue } from './SessionType';
|
||||
|
||||
describe('SessionType', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
|
||||
/**
|
||||
* Value Object: SessionType
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { SponsorshipPricing } from './SponsorshipPricing';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { Money } from './Money';
|
||||
import { SponsorshipPricing } from './SponsorshipPricing';
|
||||
|
||||
describe('SponsorshipPricing', () => {
|
||||
const mainSlot = {
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
* Used by drivers, teams, races, and leagues to define their sponsorship offerings.
|
||||
*/
|
||||
|
||||
import { Money } from './Money';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { Money } from './Money';
|
||||
|
||||
export interface SponsorshipSlotConfig {
|
||||
tier: 'main' | 'secondary';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { TeamCreatedAt } from './TeamCreatedAt';
|
||||
|
||||
describe('TeamCreatedAt', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
|
||||
export class TeamCreatedAt implements ValueObject<Date> {
|
||||
private constructor(private readonly value: Date) {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { TeamDescription } from './TeamDescription';
|
||||
|
||||
describe('TeamDescription', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
|
||||
export class TeamDescription implements ValueObject<string> {
|
||||
private constructor(private readonly value: string) {}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { TeamDrivingReasonCode, TEAM_DRIVING_REASON_CODES } from './TeamDrivingReasonCode';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import { TEAM_DRIVING_REASON_CODES, TeamDrivingReasonCode } from './TeamDrivingReasonCode';
|
||||
|
||||
describe('TeamDrivingReasonCode', () => {
|
||||
describe('create', () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { TeamName } from './TeamName';
|
||||
|
||||
describe('TeamName', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
|
||||
export class TeamName implements ValueObject<string> {
|
||||
private constructor(private readonly value: string) {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { TeamRatingDelta } from './TeamRatingDelta';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import { TeamRatingDelta } from './TeamRatingDelta';
|
||||
|
||||
describe('TeamRatingDelta', () => {
|
||||
describe('create', () => {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { TeamRatingDimensionKey } from './TeamRatingDimensionKey';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import { TeamRatingDimensionKey } from './TeamRatingDimensionKey';
|
||||
|
||||
describe('TeamRatingDimensionKey', () => {
|
||||
describe('create', () => {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { TeamRatingEventId } from './TeamRatingEventId';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import { TeamRatingEventId } from './TeamRatingEventId';
|
||||
|
||||
describe('TeamRatingEventId', () => {
|
||||
describe('create', () => {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { TeamRatingValue } from './TeamRatingValue';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import { TeamRatingValue } from './TeamRatingValue';
|
||||
|
||||
describe('TeamRatingValue', () => {
|
||||
describe('create', () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { TeamTag } from './TeamTag';
|
||||
|
||||
describe('TeamTag', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
|
||||
export class TeamTag implements ValueObject<string> {
|
||||
private constructor(private readonly value: string) {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { TrackCountry } from './TrackCountry';
|
||||
|
||||
describe('TrackCountry', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
|
||||
export class TrackCountry implements ValueObject<string> {
|
||||
private constructor(private readonly value: string) {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { TrackGameId } from './TrackGameId';
|
||||
|
||||
describe('TrackGameId', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
|
||||
export class TrackGameId implements ValueObject<string> {
|
||||
private constructor(private readonly value: string) {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { TrackId } from './TrackId';
|
||||
|
||||
describe('TrackId', () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { TrackImageUrl } from './TrackImageUrl';
|
||||
|
||||
describe('TrackImageUrl', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
|
||||
export class TrackImageUrl implements ValueObject<string | undefined> {
|
||||
private constructor(private readonly value: string | undefined) {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { TrackLength } from './TrackLength';
|
||||
|
||||
describe('TrackLength', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
|
||||
export class TrackLength implements ValueObject<number> {
|
||||
private constructor(private readonly value: number) {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { TrackName } from './TrackName';
|
||||
|
||||
describe('TrackName', () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { TrackShortName } from './TrackShortName';
|
||||
|
||||
describe('TrackShortName', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
|
||||
export class TrackShortName implements ValueObject<string> {
|
||||
private constructor(private readonly value: string) {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { TrackTurns } from './TrackTurns';
|
||||
|
||||
describe('TrackTurns', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
|
||||
export class TrackTurns implements ValueObject<number> {
|
||||
private constructor(private readonly value: number) {}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import * as mod from '@core/racing/domain/value-objects/WeekdaySet';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
describe('racing/domain/value-objects/WeekdaySet.ts', () => {
|
||||
it('imports', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { Weekday } from '../types/Weekday';
|
||||
import { weekdayToIndex } from '../types/Weekday';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
|
||||
export interface WeekdaySetProps {
|
||||
days: Weekday[];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { DriverBio } from './DriverBio';
|
||||
|
||||
describe('DriverBio', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RacingDomainValidationError } from '../../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../../errors/RacingDomainError';
|
||||
|
||||
export interface DriverBioProps {
|
||||
value: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { DriverId } from './DriverId';
|
||||
|
||||
describe('DriverId', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RacingDomainValidationError } from '../../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../../errors/RacingDomainError';
|
||||
|
||||
export interface DriverIdProps {
|
||||
value: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { DriverName } from './DriverName';
|
||||
|
||||
describe('DriverName', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RacingDomainValidationError } from '../../errors/RacingDomainError';
|
||||
import type { ValueObject } from '@core/shared/domain/ValueObject';
|
||||
import { RacingDomainValidationError } from '../../errors/RacingDomainError';
|
||||
|
||||
export interface DriverNameProps {
|
||||
value: string;
|
||||
|
||||
Reference in New Issue
Block a user