Aaryaneil - Unit Tests errorsReducer component#3002
Conversation
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
ManasaViswanadhapalli
left a comment
There was a problem hiding this comment.
@aaryaneil Just a small correction in the Description code path
the actual path is src/reducers/tests/errorsReducer.test.js but in the Description src/reducers/errorsReducer.test.js
Can you please take a look at once..
Other than that I have reviewed this PR and It is displaying all the test cases.
Please find below the reference test image

Hey @ManasaViswanadhapalli , in the description I am referring to the path of the file the unit tests are for and not the path of the unit tests. |
Sheehan20
left a comment
There was a problem hiding this comment.
The test implementation covers basic functionality, but could use additional test cases:
Error Payload Testing:
Add test for empty error message
Add test for different error status codes
Test complex error objects with nested properties
Edge Cases:
Test null/undefined error payload
Test malformed error objects
Test empty action objects
Test Organization:
Consider grouping test cases by action type (GET_ERRORS, CLEAR_ERRORS)
Add test descriptions as comments for better readability
Consider using test data fixtures for common error states
vishavk1992
left a comment
There was a problem hiding this comment.
All test cases passed successfully!! good work!!
|
Thank you all, merging! |













Description
Unit test for
src/reducers/errorsReducer.jsMain changes explained:
Added test cases for the following:
How to test:
npm installandnpm test errorsReducer.test.jsto run this PR locallyScreenshots or videos of changes: