Abhishek-Mallick / Abhishek-Mallick/universal-box

[TEMPLATE] - Jest + React | TDD

Offen
#156 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
hacktoberfest
Vorherrschende Sprache
JavaScript
Sterne
47
Forks
41
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### 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](https://universal-box.dev/) in `website/content/Templates/Testing-TDD/Jest-React-Testing-Library.md` .. refer to [this one](https://github.com/Abhishek-Mallick/universal-box/blob/main/website/content/Templates/FullStack/EJS(SSR)%2BNodejs(Backend).md) for getting an idea on the format to follow

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

- [X] Yes
- [ ] No

### 🏢 Have you read the Code of Conduct?

- [X] I have read the [Code of Conduct](https://github.com/Abhishek-Mallick/universal-box/blob/main/.github/CODE_OF_CONDUCT.md)

### Would you like to work on this issue?

No

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.