VRMS
VRMS copied to clipboard
Create New Unit Tests for ./backend/routers/grantpermission.router.js
Overview
Create unit tests for each route on ./backend/routers/grantpermission.router.js
Action Items
- [ ] Create tests for every route described in
./backend/routers/grantpermission.router.js, isolating their functionality from all dependencies - If you run into any questions, add a comment to the issue and tag "@dannyprikaz"
Resources/Instructions
https://jestjs.io/docs/getting-started Example: https://github.com/hackforla/VRMS/pull/1882/files
- This issue is part of the epic: https://github.com/hackforla/VRMS/issues/1880
Hi @dannyprikaz,
I've been working on writing unit tests for the router, but I am running into blockers due to how the logic is structured. Since functions like grantPermission, checkOrgMembershipStatus, and others are defined and used directly within the router file, it's difficult to mock them using Jest.
I’m unassigning myself from this issue for now, but I may reassign myself later if I have more time. In the meantime, anyone is welcome to take this over.
Let me know your thoughts.