A comprehensive guide to building robust test suites with AI assistance. This repository contains both presentation slides and a demo React application for demonstrating testing strategies.
- Presentation:
deck.md- Marp-based slides - Demo App: React application with TypeScript components
- Documentation: Comprehensive plans and guides in
docs/plans/
To run the React demo application:
npm run devThis starts the development server at http://localhost:5173 with:
- Button component (class-based)
- Toggle component (class-based)
- ToggleHooks component (hooks-based)
The presentation slides are in deck.md format using Marp. You can view the slides by:
- Opening
deck.mdin VS Code with the Marp extension - Using the generated
deck.pdffile
This project demonstrates modern React testing with:
- Vitest Browser Mode - Real browser testing environment
- React Testing Library - User-focused testing utilities
- Playwright MCP - AI-assisted testing workflows
- TypeScript - Type-safe testing patterns
# Run tests in watch mode
npm run test:watch
# Run tests with coverage
npm run test:coverage
# Run tests with verbose output
npm run test:verbose- 🚀 AI-Enhanced Testing: Demonstrates how AI can assist in test generation
- 🛠️ Modern Testing Stack: Vitest + React Testing Library + Playwright MCP
- 🎯 User-Focused Testing: Tests user interactions, not implementation details
- 📝 Documentation-Driven: Comprehensive plans and patterns for reliable testing
- 🔄 TypeScript Support: Full type safety in both components and tests
docs/plans/app-demo.md- React app implementation plandocs/plans/test-demo.md- Testing infrastructure planCLAUDE.md- Project instructions and automation approaches
- Prepare React Testing Infrastructure
- Write reliable tests for React components
- Use AI to write the tests
- Prompt AI to produce consistent tests
- Clone the repository
- Install dependencies:
npm install - Run the demo app:
npm run dev - Explore the components in
src/components/ - Review the test plans in
docs/plans/