Skip to content

Latest commit

 

History

History
executable file
·
34 lines (22 loc) · 1.04 KB

File metadata and controls

executable file
·
34 lines (22 loc) · 1.04 KB

This is an example of a Next.js project with Playwright code coverage enabled through the monocart-reporter.

Instructions for your project

  • (Code) Set up your playwright.config.ts for the monocart-reporter.
  • (Code) Update your Webpack config to set config.devtool to "source-map".
  • (Code) Include the beforeEach and afterEach coverage collection in each of your test files, for client coverage.
  • (Code) Include globalTeardown.js to collect server coverage.

Setup and testing

When debugging, you can use ./start.sh to make sure you're working with a fresh environment.

Install dependencies

bun install

Serve app

bun dev

Run Playwright tests

bun test:e2e

Results

After bun test:e2e has finished, open /playwright/results/coverage/index.html in your browser to view the client-side coverage report.