integration tests
This commit is contained in:
@@ -93,6 +93,12 @@ export class InMemoryDriverRepository implements DriverRepository {
|
||||
return Promise.resolve(this.iracingIdIndex.has(iracingId));
|
||||
}
|
||||
|
||||
async clear(): Promise<void> {
|
||||
this.logger.info('[InMemoryDriverRepository] Clearing all drivers');
|
||||
this.drivers.clear();
|
||||
this.iracingIdIndex.clear();
|
||||
}
|
||||
|
||||
// Serialization methods for persistence
|
||||
serialize(driver: Driver): Record<string, unknown> {
|
||||
return {
|
||||
|
||||
@@ -212,4 +212,10 @@ async getMembership(teamId: string, driverId: string): Promise<TeamMembership |
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
async clear(): Promise<void> {
|
||||
this.logger.info('[InMemoryTeamMembershipRepository] Clearing all memberships and join requests');
|
||||
this.membershipsByTeam.clear();
|
||||
this.joinRequestsByTeam.clear();
|
||||
}
|
||||
}
|
||||
@@ -124,6 +124,11 @@ export class InMemoryTeamRepository implements TeamRepository {
|
||||
}
|
||||
}
|
||||
|
||||
async clear(): Promise<void> {
|
||||
this.logger.info('[InMemoryTeamRepository] Clearing all teams');
|
||||
this.teams.clear();
|
||||
}
|
||||
|
||||
// Serialization methods for persistence
|
||||
serialize(team: Team): Record<string, unknown> {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user