Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve test coverage & fix exposed issues #80

Merged
merged 11 commits into from
Nov 25, 2023

Conversation

danielemery
Copy link
Owner

@danielemery danielemery commented Nov 13, 2023

  • Adds tests to all services and utils
  • Fixes an issue where statistics cache was using the wrong units for TTL
  • Fixes an issue where getUsersWithRole was ignoring the role when the NUMBER_OF_QUIZZES_COMPLETED_WITH_DESC sort option was being used
  • Refactors UserService.getUsers to be better typed using function overloading

Out of scope (due to be less valuable and a little more tedious):

  • Persistence layer
  • Graphql layer

@danielemery danielemery self-assigned this Nov 13, 2023
@danielemery danielemery linked an issue Nov 13, 2023 that may be closed by this pull request
@codecov-commenter
Copy link

codecov-commenter commented Nov 13, 2023

Codecov Report

Attention: 26 lines in your changes are missing coverage. Please review.

Comparison is base (9b44d32) 20.65% compared to head (6009626) 32.92%.

Files Patch % Lines
src/user/user.service.ts 43.75% 9 Missing ⚠️
src/user/user.persistence.ts 0.00% 7 Missing ⚠️
src/user/user.gql.ts 0.00% 5 Missing ⚠️
src/service.locator.ts 0.00% 3 Missing ⚠️
src/auth/authentication.service.ts 0.00% 1 Missing ⚠️
src/quiz/quiz.gql.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #80       +/-   ##
===========================================
+ Coverage   20.65%   32.92%   +12.27%     
===========================================
  Files          19       22        +3     
  Lines         460      489       +29     
  Branches       70       75        +5     
===========================================
+ Hits           95      161       +66     
+ Misses        353      318       -35     
+ Partials       12       10        -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@danielemery danielemery marked this pull request as ready for review November 25, 2023 05:02
@danielemery danielemery merged commit a6291c9 into main Nov 25, 2023
2 checks passed
@danielemery danielemery deleted the 79-improve-test-coverage branch May 11, 2024 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve test coverage
2 participants