This repository demonstrates building a React app using Bun, with code coverage generated using the bun-plugin-istanbul. The app is served using bun.serve, and tests are executed with Playwright. Post-test execution, a script generates code coverage data.
bun
react
csr
typescript
react-router-dom-v6
playwright
nyc
bun-plugin-istanbul
code-coverage
-
React App with Bun: Using Bun as the runtime and bundler for fast builds and server starts.
-
Code Coverage with bun-plugin-istanbul: Instrumentation for code coverage during tests.
-
Testing with Playwright: End-to-end testing with Playwright.
-
Coverage Report Generation: Script to generate a complete coverage report.
curl -fsSL https://bun.sh/install | bash # for macOS, Linux, and WSL
bun create https://github.com/hedaukartik/bun-react-playwright-coverage name-of-your-project
bun install
bun dev
bun run test:e2e
bun run test:e2e:generate:coverage
bun run test:e2e:generate:show-report
Contributions are welcome! If you have ideas for improvements or want to report issues, feel free to open an issue or a pull request.