Skip to content

Commit

Permalink
fix: improve coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
whiitex committed May 24, 2024
1 parent 3c82ffa commit 76bd43c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions api/src/availability/availability.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ export class AvailabilityService {
return matches.length > 0 ? matches[0] : null;
}

/**
* Find all availabilities for a given user
* @param user - User to find availabilities for
* @returns {Promise<Availability[]>} - List of availabilities for the user
*/
async findByUserAndTimeSlot(user: User, timeSlot: TimeSlot) {
const matches = await this.availabilityRepository.findBy({
user: user as any,
Expand Down
3 changes: 2 additions & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ sonar.projectName=HKrecruitment
sonar.javascript.lcov.reportPaths=./coverage/shared/lcov.info, ./coverage/api/lcov.info, ./coverage/api-e2e/lcov.info
sonar.sources=api/, frontend/, shared/
sonar.coverage.exclusions=**/node_modules/**/*, **/*.spec.*, **/*.e2e-spec.*, **/documentation/**/*, **/frontend/**/*, **/test/**/*, **/tests/**/*, **/*.json, **/*.yaml, **/*.yml, **/*.md
sonar.cpd.exclusions=**/mocks/**/*
sonar.cpd.exclusions=**/mocks/**/*
sonar.exclusions**/mocks/**/*, =**/node_modules/**/*, **/*.spec.*, **/*.e2e-spec.*, **/documentation/**/*, **/frontend/**/*, **/test/**/*, **/tests/**/*, **/*.json, **/*.yaml, **/*.yml, **/*.md

0 comments on commit 76bd43c

Please sign in to comment.