swc-project / swc-project/swc-node

Mystery file reported in coverage report using @swc-node/jest with v8 coveargeProvider

Open
#664 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2k
Forks
95
Avg merge
14d 11h
Merged PRs (30d)
1

Description

When using v8 coverageProvider, a file named <<jsx-config-pragma.js>> which is not port of our source code is reported in the code coverage report. When switching to babel coverageProvider (the default from jest) or using ts-jest with v8 coverageProvider the file doesn't exist.

Node version: 16.6.0
Jest version: 27.5.1
@swc-node/jest version: 1.5.2

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.

Research direction

Reproduce the report with Node 16.6.0, Jest 27.5.1, and @swc-node/jest 1.5.2, comparing the v8 and babel coverage providers. Trace how v8 coverage handles the generated <<jsx-config-pragma.js>> file and add a regression check; done when that non-source file is absent from the coverage report.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.