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

Feat:Frontend Unit test setup integration #97

Closed
2 tasks done
yashpandey06 opened this issue Dec 4, 2024 · 6 comments
Closed
2 tasks done

Feat:Frontend Unit test setup integration #97

yashpandey06 opened this issue Dec 4, 2024 · 6 comments

Comments

@yashpandey06
Copy link

yashpandey06 commented Dec 4, 2024

Description

Currently, the frontend codebase lacks sufficient unit tests to ensure the reliability and maintainability of the application. Unit tests are essential for catching bugs early, improving code quality, and providing confidence when making changes or adding new features.

This issue proposes the addition of unit tests for the frontend using a testing library such as Jest and React Testing Library (if applicable for React-based projects). These tools are widely used in the industry and provide a robust framework for testing JavaScript and React components.

Benefits

  1. Improved Code Quality: Unit tests help identify bugs and edge cases early in the development process.
  2. Refactoring Confidence: With unit tests in place, developers can refactor code without fear of breaking existing functionality.
  3. Documentation: Unit tests serve as a form of documentation, showing how components and functions are expected to behave.
  4. Faster Debugging: When a test fails, it pinpoints the exact location of the issue, making debugging faster and more efficient.

Proposed Process

  1. Choose a Testing Framework:

    • Use Jest for JavaScript/TypeScript testing.
    • Use React Testing Library for testing React components (if applicable).
  2. Write Tests for Core Components and Functions:

    • Identify critical components and functions in the frontend codebase.
    • Write unit tests to cover their expected behavior.
  3. Set Up Test Coverage Reporting:

    • Configure Jest to generate test coverage reports.
    • Aim for a minimum test coverage threshold (e.g., 80%).
  4. Integrate Tests into CI/CD Pipeline:

    • Ensure that tests are run automatically during the CI/CD process to prevent regressions.

Add ScreenShots

Screenshot 2024-12-04 at 8 08 55 PM

Record

  • I agree to follow this project's Code of Conduct
  • I want to work on this issue
@yashpandey06
Copy link
Author

@Pranav0-0Aggarwal let me know your views so that we can discuss it further !

@ssparser
Copy link

ssparser commented Dec 7, 2024

hey @yashpandey06 I am also interested to work on this issue.

@Raakshass
Copy link

i want to work on this issue

@AasmitPadea
Copy link

I would like to work on this issue can you assign this issue to me and i would prefer to use jest and react testing library both so the system works properly

@Spoorthy1423
Copy link

Hey, can u please assign me this issue, @yashpandey06 , i would love to solve this issue

@Pranav0-0Aggarwal
Copy link
Member

Too early for unit testing.
Closing this issue.

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

No branches or pull requests

6 participants