Skip to content
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

Vijay Anand - Added unit test for roleReducer.js #2859

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

vijay10pk
Copy link
Contributor

Description

Unit tests for roleReducer.

Related PRS (if any):

No related PRs

  • Main changes explained:

  • Added a new test file roleReducer.test.js to verify roleReducer functionality.
  • The list of test cases for roleReducer includes:
    • returns the initial state when no action type is specified
    • handles RECEIVE_ROLES action by sorting roles based on permissions length
    • handles ADD_NEW_ROLE action by adding a new role to the state
    • handles UPDATE_ROLE action by updating an existing role in the state
    • returns the current state for unknown action types

How to test:

  1. Check out the current branch.
  2. Run npm install and npm test roleReducer.test.js.
  3. Verify all test cases pass without any errors.

Screenshots or videos of changes:

image

Note:

Include the information the reviewers need to know.

Copy link

netlify bot commented Nov 12, 2024

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit 4a3cc76
🔍 Latest deploy log https://app.netlify.com/sites/highestgoodnetwork-dev/deploys/6732cceb475419000880f5d9
😎 Deploy Preview https://deploy-preview-2859--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@SatyashanthiT
Copy link
Contributor

I have tested the changes in roleReducer.test.js, and all functionalities work as expected. The test cases passed successfully.

image

Copy link

@anirudhsk2107 anirudhsk2107 left a comment

Choose a reason for hiding this comment

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

All tests have passed

Screen Shot 2024-11-13 at 1 28 10 PM

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.

3 participants