Skip to content

@swc/jest code coverage is different when passing maxWorkers=1 using v8 coverage provider #61

@abnud11

Description

@abnud11

I'm using @swc/jest with jest 29, I'm currently testing a Next.js app and have configured a global coverage treshold.

The problem is, on Github Actions my CI Server, coverage fails.

locally it succeeds, but when passing --maxWorkers=1 simulating what happens on CI Server, it fails too.

So in summary, coverage becomes different when passing --maxWorkers=1, I don't have any global state or tests that rely on each other, also the uncovered lines seem wrong to me since they should be covered by tests. all tested code is frontend React code.

the coverage provider I'm using is V8. I'm using Typescript 5.6 in both test code and tested code.

My OS Is Arch Linux, Node.js version is 20.17, jest version is 29.7, @swc/jest version is 0.2.36

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions