test: improve coverage for Tasks component#395
test: improve coverage for Tasks component#395its-me-abhishek merged 5 commits intoCCExtractor:mainfrom
Conversation
|
Thank you for opening this PR! Before a maintainer takes a look, it would be really helpful if you could walk through your changes using GitHub's review tools. Please take a moment to:
More information on how to conduct a self review: This helps make the review process smoother and gives us a clearer understanding of your thought process. Once you've added your self-review, we'll continue from our side. Thank you! |
its-me-abhishek
left a comment
There was a problem hiding this comment.
kindly look into it
|
|
||
| test('does not render tasks when loading is true', () => { | ||
| render(<Tasks {...mockProps} isLoading={true} />); | ||
|
|
There was a problem hiding this comment.
please remove the empty rows, and comments since the tests are self descriptive
There was a problem hiding this comment.
additionally i guess we shall aim for more test coverage, if and where possible in Tasks
There was a problem hiding this comment.
please remove the empty rows, and comments since the tests are self descriptive
sure, I have refactored the code accordingly and made a commit regarding it.
There was a problem hiding this comment.
additionally i guess we shall aim for more test coverage, if and where possible in Tasks
Ok, I will add few more tests,
also currently code is failing Prettier thing, i'll just have to run one CLI code to fix it,
I'll update the code by tomorrow.
Removed unnecessary comments and adjusted mock for TaskSkeleton component in tests.
|
Hey @its-me-abhishek, I’ve removed the extra rows and comments as suggested and added a few more self-descriptive tests to further improve coverage for the Tasks component. All tests are passing now. Please let me know if there’s anything else you’d like me to look into. |
Description
Adds a meaningful unit test for the
Taskscomponent covering loading-state behavior.The test ensures tasks are not rendered while data is loading, improving test coverage without changing any production logic.
Checklist
npx prettier --write .(for formatting)gofmt -w .(for Go backend)npm test(for JS/TS testing)Additional Notes
No functional changes were made. This PR only adds a unit test for existing behavior.