-
Notifications
You must be signed in to change notification settings - Fork 69
test: improve coverage for Tasks component #395
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove the empty rows, and comments since the tests are self descriptive
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.
additionally i guess we shall aim for more test coverage, if and where possible in Tasks
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.