-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jinda unit test teams #3095
base: development
Are you sure you want to change the base?
Jinda unit test teams #3095
Conversation
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Jinda, great job on this PR! The test coverage looks solid, and I appreciate the clear structure of the test cases. The mock implementations are well-placed, and the assertions effectively verify the expected behavior. One small suggestion would be to ensure consistent naming between getUserTeamMembers and getUserTeamMembers1 to improve clarity. Other than that, everything looks good!
Description
Added unit tests for the
team.js
action creators.Related PRS (if any):
No related PRs.
Main changes explained:
teams.js.test.js
under the appropriate directory.setTeamDetail
: Ensures the correct action is created with the provided data.getUserTeamMembers
: Ensures the correct endpoint is called and verifies that the correct action is dispatched with the fetched data.getUserTeamMembers1
: Similar validation asgetUserTeamMembers
, but for a different implementation.getTeamDetail
: Ensures the correct endpoint is called and verifies that the correct action is dispatched with the fetched data.fetchAllManagingTeams
: Ensures the correct endpoints are called and verifies that the correct actions are dispatched with the fetched data.axios.get
method fails with a 401 error.How to test:
npm install
if necessary.npm test teams.js.test.js
Screenshots or videos of changes: