Skip to content

Unit Testing for Grant Permission Router#2091

Open
jng34 wants to merge 3 commits intohackforla:developmentfrom
jng34:unitTestingGrantPermissionRouter
Open

Unit Testing for Grant Permission Router#2091
jng34 wants to merge 3 commits intohackforla:developmentfrom
jng34:unitTestingGrantPermissionRouter

Conversation

@jng34
Copy link
Member

@jng34 jng34 commented Feb 24, 2026

Fixes #1889

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

  • create unit testing for grantpermission.router.js
  • necessary to ensure that the grantpermission.router is functioning properly

@bconti123 bconti123 self-requested a review March 16, 2026 02:55
Copy link
Member

@bconti123 bconti123 left a comment

Choose a reason for hiding this comment

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

This unit test looks good to me. I reviewed each pass/fail case and read through the related functions to understand what the tests were covering.

I ran coverage and noticed the uncovered lines in grantpermission.router.js. My current assumption is that several of these lines may be better suited for future integration testing.

I ran this command:

npm test -- --coverage --runTestsByPath routers/grantpermission.router.test.js
unittesting

Uncovered lines noted:
Line 57
Line 64
Line 151
Line 161-166
Line 189
Line 194
Line 230-268
Line 344

I approved this PR and am leaving these uncovered lines as a note for possible follow-up integration coverage.

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/grantpermission.router.js

2 participants