Skip to content

Unit Testing for Auth Router#1927

Merged
trillium merged 4 commits intohackforla:developmentfrom
jng34:unitTestingForAuth
Feb 3, 2026
Merged

Unit Testing for Auth Router#1927
trillium merged 4 commits intohackforla:developmentfrom
jng34:unitTestingForAuth

Conversation

@jng34
Copy link
Member

@jng34 jng34 commented May 13, 2025

Fixes #1885

What changes did you make and why did you make them ?

  • Wrote unit tests for auth.router
  • Necessary to independently each of the routes to test proper functionality

Screenshots of Passed Tests

image

@JackHaeg JackHaeg requested a review from dannyprikaz May 15, 2025 22:44
@JackHaeg
Copy link
Member

Hi @jng34 - It looks like there are some conflicts in this PR. Can you please resolve these conflicts when you have a moment?

@jng34
Copy link
Member Author

jng34 commented Jun 17, 2025

@JackHaeg Oops! I might have made a mistake. Let me confirm again once resolved. Sorry!

@jng34
Copy link
Member Author

jng34 commented Jun 17, 2025

@JackHaeg The conflict should be resolved.

@JackHaeg
Copy link
Member

@dannyprikaz FYI - this PR is now ready for review per @jng34 👍

@jng34 jng34 closed this Sep 23, 2025
@jng34 jng34 deleted the unitTestingForAuth branch September 23, 2025 19:50
@JackHaeg
Copy link
Member

@jng34 This is the PR that was discussed on tonight's call. Please take a look at it when you have a moment to double check if this was closed by accident :)

@jng34 jng34 restored the unitTestingForAuth branch September 30, 2025 12:53
@jng34
Copy link
Member Author

jng34 commented Sep 30, 2025

@JackHaeg I was removing old branches on my local machine, and might have deleted the branch associated with this PR. I don't think it should have closed the PR though...weird. Anyway, I have reopened it.

@jng34 jng34 reopened this Sep 30, 2025
@JackHaeg
Copy link
Member

JackHaeg commented Oct 7, 2025

PR is ready for review

@JackHaeg JackHaeg removed the request for review from dannyprikaz October 7, 2025 02:23
@JackHaeg JackHaeg requested a review from rteas January 27, 2026 03:19
Copy link
Member

@trillium trillium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: Approve

Summary: Adds comprehensive unit tests for Auth router covering all auth endpoints.

Tests (5/5 passing)

  • ✅ POST /api/auth/signup
  • ✅ POST /api/auth/signin
  • ✅ POST /api/auth/verify-signin
  • ✅ POST /api/auth/me
  • ✅ POST /api/auth/logout

Notes

  • Good middleware mocking (AuthUtil, verifyUser, verifyToken)
  • Cookie handling properly tested
  • Minor: console.log in mock (line 118) could be removed

Rebased onto upstream/development. Ready to merge.

@trillium trillium merged commit 73a7a23 into hackforla:development Feb 3, 2026
3 of 5 checks passed
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.

Create New Unit Tests for ./backend/routers/auth.router.js

3 participants