Incomplete coverage report?

Open
#22 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Domain
frontend, testing

Research direction

Reproduce the report using the Next.js 13.5.4 setup with swc-plugin-coverage-instrument and the rendered React component described in the issue. Inspect why the export is marked covered while the component is not; done means coverage accurately reflects the component render and the existing test still reports coverage correctly.

Written by the indexing model from the issue text.

Description

Hi, thanks for the library.

For some reason some React components that are part of the pages I'm testing don't result covered, here's an example.

CleanShot 2024-04-18 at 4  47 06@2x

The export is marked as covered but the component itself doesn't, but I am 100% sure the component is being rendered in the page. I tried to throw new Error("nyc") from it and the test failed with the expected error message.

I'm using Next.js 13.5.4 with swc-plugin-coverage-instrument.

Do you know what could be going on here?

Dominant language
TypeScript
Stars
143
Forks
20
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mxschmitt/playwright-test-coverage

All issues in mxschmitt/playwright-test-coverage

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.