Skip to content

WIP: refactor(server/auth-strategies): refactor to testable named functions#4065

Draft
iainsproat wants to merge 11 commits into
mainfrom
iain/refactor-auth-strategies
Draft

WIP: refactor(server/auth-strategies): refactor to testable named functions#4065
iainsproat wants to merge 11 commits into
mainfrom
iain/refactor-auth-strategies

Conversation

@iainsproat
Copy link
Copy Markdown
Contributor

Description & motivation

We do not have tests for a number of auth strategies. This PR refactors anonymous inline functions to named functions which can be tested in isolation.

This PR builds upon #4044

Changes:

To-do before merge:

Screenshots:

Validation of changes:

Checklist:

  • My pull request follows the guidelines in the Contributing guide?
  • My pull request does not duplicate any other open Pull Requests for the same update/change?
  • My commits are related to the pull request and do not amend unrelated code or documentation.
  • My code follows a similar style to existing code.
  • I have added appropriate tests.
  • I have updated or added relevant documentation.

References

@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 5, 2025

Codecov Report

Attention: Patch coverage is 83.33333% with 9 lines in your changes missing coverage. Please review.

Project coverage is 71.51%. Comparing base (4a29174) to head (4914faa).
Report is 1791 commits behind head on main.

Files with missing lines Patch % Lines
packages/server/modules/auth/strategies/local.ts 81.63% 6 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4065      +/-   ##
==========================================
- Coverage   71.51%   71.51%   -0.01%     
==========================================
  Files         400      400              
  Lines       18170    18176       +6     
  Branches     2961     2961              
==========================================
+ Hits        12995    12999       +4     
- Misses       4166     4168       +2     
  Partials     1009     1009              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant