remove companion tests
This commit is contained in:
@@ -66,10 +66,10 @@ describeIfDatabase('TypeORM Racing repositories (postgres slice)', () => {
|
||||
const scoringRepo = new TypeOrmLeagueScoringConfigRepository(dataSource, scoringConfigMapper);
|
||||
|
||||
const league = League.create({
|
||||
id: 'league-it-1',
|
||||
id: '00000000-0000-0000-0000-000000000001',
|
||||
name: 'Integration League',
|
||||
description: 'For integration testing',
|
||||
ownerId: 'driver-it-1',
|
||||
ownerId: '00000000-0000-0000-0000-000000000002',
|
||||
settings: { pointsSystem: 'custom', visibility: 'unranked', maxDrivers: 32 },
|
||||
participantCount: 0,
|
||||
});
|
||||
@@ -77,7 +77,7 @@ describeIfDatabase('TypeORM Racing repositories (postgres slice)', () => {
|
||||
await leagueRepo.create(league);
|
||||
|
||||
const season = Season.create({
|
||||
id: 'season-it-1',
|
||||
id: '00000000-0000-0000-0000-000000000003',
|
||||
leagueId: league.id.toString(),
|
||||
gameId: 'iracing',
|
||||
name: 'Integration Season',
|
||||
@@ -114,7 +114,7 @@ describeIfDatabase('TypeORM Racing repositories (postgres slice)', () => {
|
||||
};
|
||||
|
||||
const championship: ChampionshipConfig = {
|
||||
id: 'champ-it-1',
|
||||
id: '00000000-0000-0000-0000-000000000004',
|
||||
name: 'Driver Championship',
|
||||
type: 'driver',
|
||||
sessionTypes: ['main' as SessionType],
|
||||
@@ -124,7 +124,7 @@ describeIfDatabase('TypeORM Racing repositories (postgres slice)', () => {
|
||||
};
|
||||
|
||||
const scoring = LeagueScoringConfig.create({
|
||||
id: 'lsc-it-1',
|
||||
id: '00000000-0000-0000-0000-000000000005',
|
||||
seasonId: season.id,
|
||||
scoringPresetId: 'club-default',
|
||||
championships: [championship],
|
||||
@@ -133,7 +133,7 @@ describeIfDatabase('TypeORM Racing repositories (postgres slice)', () => {
|
||||
await scoringRepo.save(scoring);
|
||||
|
||||
const race = Race.create({
|
||||
id: 'race-it-1',
|
||||
id: '00000000-0000-0000-0000-000000000006',
|
||||
leagueId: league.id.toString(),
|
||||
scheduledAt: new Date('2025-03-01T12:00:00.000Z'),
|
||||
track: 'Spa',
|
||||
@@ -147,12 +147,12 @@ describeIfDatabase('TypeORM Racing repositories (postgres slice)', () => {
|
||||
expect(persistedLeague?.name.toString()).toBe('Integration League');
|
||||
|
||||
const seasons = await seasonRepo.findByLeagueId(league.id.toString());
|
||||
expect(seasons.map((s: Season) => s.id)).toContain('season-it-1');
|
||||
expect(seasons.map((s: Season) => s.id)).toContain('00000000-0000-0000-0000-000000000003');
|
||||
|
||||
const races = await raceRepo.findByLeagueId(league.id.toString());
|
||||
expect(races.map((r: Race) => r.id)).toContain('race-it-1');
|
||||
expect(races.map((r: Race) => r.id)).toContain('00000000-0000-0000-0000-000000000006');
|
||||
|
||||
const persistedScoring = await scoringRepo.findBySeasonId(season.id);
|
||||
expect(persistedScoring?.id.toString()).toBe('lsc-it-1');
|
||||
expect(persistedScoring?.id.toString()).toBe('00000000-0000-0000-0000-000000000005');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user