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

[TEMPLATE] - Jest + React | TDD #156

Open
2 of 3 tasks
Abhishek-Mallick opened this issue Oct 19, 2024 · 0 comments
Open
2 of 3 tasks

[TEMPLATE] - Jest + React | TDD #156

Abhishek-Mallick opened this issue Oct 19, 2024 · 0 comments
Labels
hacktoberfest marks issues which are accepted under hacktoberfest

Comments

@Abhishek-Mallick
Copy link
Owner

Abhishek-Mallick commented Oct 19, 2024

What domain will the project template be based on?

Others (please specify in the details)

If 'Others', please specify the preferred domain.

Testing-TDD

Particular directory path for the template.

templates/Testing-TDD/Jest-React-Testing-Library/

What tech stacks do you want to include?

React, Jest, React Testing Library, Babel, Webpack

Brief Description

This template offers a complete setup for unit and integration testing in a React application. It includes sample tests for components, hooks, and context, along with configuration files to ensure your testing environment is ready to go. The setup also demonstrates how to mock API calls and manage asynchronous code.

Key Features:

  1. Testing Configuration: Pre-configured Jest and Babel settings for ES6+ support.
  2. Sample Components: Include a variety of React components (functional, class-based) for testing.
  3. Test Examples: Provide example tests covering rendering, user interactions, and state changes.
  4. Mocking: Demonstrate how to mock external modules and API requests.
  5. Code Coverage: Generate code coverage reports and enforce coverage thresholds.
  6. Continuous Integration: Include configuration for running tests in a CI environment (e.g., GitHub Actions).

Ideal Workflow:

  • Develop sample React components and ensure they are well-documented.
  • Write comprehensive tests using React Testing Library and Jest.
  • Configure scripts in package.json for running tests and generating coverage reports.
  • Update the README with instructions on how to run tests and interpret results.
  • Ensure compatibility with the latest versions of React and Jest.
  • Optionally, include examples of testing custom hooks and context providers.
  • Create a corresponding markdown for populating docs in website/content/Templates/Testing-TDD/Jest-React-Testing-Library.md .. refer to this one for getting an idea on the format to follow

👀 Have you spent some time checking if this issue has been raised before?

  • Yes
  • No

🏢 Have you read the Code of Conduct?

Would you like to work on this issue?

No

@Abhishek-Mallick Abhishek-Mallick added the hacktoberfest marks issues which are accepted under hacktoberfest label Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest marks issues which are accepted under hacktoberfest
Projects
None yet
Development

No branches or pull requests

1 participant