Skip to content

Conversation

@bhavikcodes
Copy link
Contributor

@bhavikcodes bhavikcodes commented Jan 17, 2026

Description

Adds a meaningful unit test for the Tasks component covering loading-state behavior.
The test ensures tasks are not rendered while data is loading, improving test coverage without changing any production logic.

Checklist

  • Ran npx prettier --write . (for formatting)
  • Ran gofmt -w . (for Go backend)
  • Ran npm test (for JS/TS testing)
  • Added unit tests, if applicable
  • Verified all tests pass
  • Updated documentation, if needed

Screenshot 2026-01-17 234805

Additional Notes

No functional changes were made. This PR only adds a unit test for existing behavior.

@github-actions
Copy link

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:

  • Check the "Files changed" tab
  • Leave comments on any lines for functions, comments, etc. that are important, non-obvious, or may need attention
  • Clarify decisions you made or areas you might be unsure about and/or any future updates being considered.
  • Finally, submit all the comments!

More information on how to conduct a self review:
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request

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!

Copy link
Collaborator

@its-me-abhishek its-me-abhishek left a 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} />);

Copy link
Collaborator

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

Copy link
Collaborator

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

Copy link
Contributor Author

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.

Copy link
Contributor Author

@bhavikcodes bhavikcodes Jan 17, 2026

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.

@bhavikcodes
Copy link
Contributor Author

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.

@its-me-abhishek its-me-abhishek merged commit 7eea998 into CCExtractor:main Jan 18, 2026
5 checks passed
@bhavikcodes bhavikcodes deleted the tests branch January 18, 2026 10:35
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.

Add frontend test suites/cases for src/components/HomeComponents/Tasks

2 participants