This project serves as a comprehensive playbook for testing React applications. It provides practical examples, guidelines, and best practices for implementing various testing strategies, including unit, integration, and end-to-end testing.
The goal of this project is to help developers write robust and maintainable React applications by providing a clear and actionable guide to testing. It addresses the common challenges and complexities associated with testing React components and offers solutions that are easy to implement and integrate into existing workflows.
To install and set up the project, follow these steps:
-
Clone the repository:
git clone [email protected]:LuisGilGB/react-testing-playbook.git
-
Install dependencies using Bun:
bun install
Provide examples and guidelines on how to use the project effectively.
bun dev
This project incorporates several cutting-edge technologies and approaches:
- Web Container: The demos are hosted using a Web Container, providing a consistent and isolated environment for running the examples.
- React Web Container Integration: Seamless integration of the Web Container within a React application.
- TanStack Start: Utilizes TanStack Start for enhanced project setup and development experience.
- Bun: Employs Bun as the project's package manager and runtime, leveraging its speed and efficiency.
- Vitest and React Testing Library in a Web Container: Integration of Vitest with React Testing Library to run tests directly within the web container.
- Monaco Editor: Integration of the Monaco Editor for in-browser code editing, enabling real-time modifications and testing.
- Xterm: Integration of Xterm for in-browser terminal, enabling interaction with the web container.
- Expand testing examples to cover more complex scenarios.
- A tool to select a test from the demo suite.
- Use the router as a source of state (e.g. selected test).
- Improve the UI/UX of the project.
- Improve documentation and examples.
MIT
Note: This project is currently under active development.