Skip to content

A starter template showcasing how to build a React app using Bun, instrument code for coverage with bun-plugin-istanbul, and run Playwright end-to-end tests. It generates detailed code coverage reports, providing a streamlined workflow for testing and analyzing application quality.

License

Notifications You must be signed in to change notification settings

hedaukartik/bun-react-playwright-coverage

Repository files navigation



react bun playwright

Bun CSR React App Playwright Coverage

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

Features

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

You need bun installed in your system for this template:

curl -fsSL https://bun.sh/install | bash # for macOS, Linux, and WSL

To use this template to start a new react client-side rendering project from scratch:

bun create https://github.com/hedaukartik/bun-react-playwright-coverage name-of-your-project

To install dependencies:

bun install

To run app:

bun dev

To run playwright test:

bun run test:e2e

To generate code coverage after running playwright test:

bun run test:e2e:generate:coverage

To view the html code coverage report after generating:

bun run test:e2e:generate:show-report

image

Contributing

Contributions are welcome! If you have ideas for improvements or want to report issues, feel free to open an issue or a pull request.

About

A starter template showcasing how to build a React app using Bun, instrument code for coverage with bun-plugin-istanbul, and run Playwright end-to-end tests. It generates detailed code coverage reports, providing a streamlined workflow for testing and analyzing application quality.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published