Unit Testing for Grant Permission Router#2091
Open
jng34 wants to merge 3 commits intohackforla:developmentfrom
Open
Unit Testing for Grant Permission Router#2091jng34 wants to merge 3 commits intohackforla:developmentfrom
jng34 wants to merge 3 commits intohackforla:developmentfrom
Conversation
bconti123
approved these changes
Mar 21, 2026
Member
bconti123
left a comment
There was a problem hiding this comment.
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
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1889
What changes did you make and why did you make them ?
grantpermission.router.jsgrantpermission.routeris functioning properly