swc-project / pkgs

node.js packages for SWC
49 stars 15 forks source link

@swc/jest creates an incorrect coverage report #32

Closed hheimerd closed 3 months ago

hheimerd commented 6 months ago

I set up the project as described in the instructions, but the jest coverage is generated incorrectly:

  1. Arrow functions that return jsx with specified pops without curly brackets are not included in the coverage.
  2. imports are included in the coverage
  3. exports are included in the coverage

I made a minimal case and included coverage files in the repository https://github.com/hheimerd/swc-jest-report

Screenshot 2024-03-26 at 14 25 53

P.S. if you set sourceMaps to true, the internal functions will be included in the report, which is also strange

mateus4k commented 3 months ago

Hey, did you find any solution for this?

kdy1 commented 3 months ago

Duplicate of https://github.com/swc-project/swc/issues/3854