Skip to content

Conversation

@dannyprikaz
Copy link
Member

Fixes #1881

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

  • Moved tests for users.router.js to backend/test/ directory
  • Wrote unit tests for users.router.js that isolate the behavior of the router from its dependencies

@dannyprikaz
Copy link
Member Author

Want to review this pull request? Take a look at this documentation for a step by step guide!

From your project repository, check out a new branch and test the changes.

git checkout -b dannyprikaz-1881-users-router-unit-tests
git pull https://github.com/dannyprikaz/VRMS.git 1881-users-router-unit-tests

@JackHaeg
Copy link
Member

@jng34 Given that you are also working on unit tests issues, we would love for you to take a crack at reviewing this PR from @dannyprikaz!

@JackHaeg JackHaeg requested a review from jng34 May 15, 2025 22:46
Copy link
Member

@jng34 jng34 left a comment

Choose a reason for hiding this comment

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

@dannyprikaz All unit tests passed. Great use of comments and good template for writing future tests!

@JackHaeg
Copy link
Member

@dannyprikaz given that we have @jng34 approval, please feel free to go ahead and merge this PR whenever you have a moment. Would love for you to get the GitHub credit for this one!

@dannyprikaz dannyprikaz requested a review from jng34 May 26, 2025 03:50
@dannyprikaz
Copy link
Member Author

Hey, @jng34

I figured out how to test specific expectations of request bodies and url parameters that are passed to controller methods. This should make our tests more complete. Could you please review this one more time. I'm going to include the technique that I learned on PRs that I'm reviewing from you.

Copy link
Member

@jng34 jng34 left a comment

Choose a reason for hiding this comment

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

@dannyprikaz
The changes are definitely more complete now, given that you're now able to parse the incoming data. Great work!

@jng34
Copy link
Member

jng34 commented May 27, 2025

@JackHaeg
I forget, should I merge the pull request or wait for a 2nd reviewer for this?

@dannyprikaz dannyprikaz merged commit 4a377e2 into hackforla:development May 28, 2025
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/users.router.js

3 participants