Skip to content

A live suit of tests of React components that runs on the browser using web containers.

Notifications You must be signed in to change notification settings

LuisGilGB/react-testing-playbook

Repository files navigation

React Testing Playbook

Description

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.

Live demo

Table of Contents

Why

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.

Installation

To install and set up the project, follow these steps:

  1. Clone the repository:

    git clone [email protected]:LuisGilGB/react-testing-playbook.git
  2. Install dependencies using Bun:

    bun install

Usage

Provide examples and guidelines on how to use the project effectively.

bun dev

Cutting-Edge Technical Aspects

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.

Future Enhancements

  • 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.

References

License

MIT


Note: This project is currently under active development.

About

A live suit of tests of React components that runs on the browser using web containers.

Resources

Stars

Watchers

Forks