Skip to content

Coverage seems to run twice each test #6265

Description

@youf-olivier

Is this a bug report?

Yes

Did you try recovering your dependencies?

Yes

Which terms did you search for in User Guide?

test jest coverage

Environment

Environment Info:

System:
OS: Windows 7
CPU: x64 Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz
Binaries:
Yarn: 1.7.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
Browsers:
Internet Explorer: 11.0.9600.19236
npmPackages:
react: 16.7.0 => 16.7.0
react-dom: 16.7.0 => 16.7.0
react-scripts: 2.1.3 => 2.1.3
npmGlobalPackages:
create-react-app: Not Found

Steps to Reproduce

npx create-react-app my-app-test
cd my-app-test\
npm run test -- --coverage

Expected Behavior

image

Actual Behavior

image

Actually, I had this problem last year, I could resolve it because I had Jest in Dev Dependencies, and it seems to be problematic.
But, now I have the same problem, but whatever the configuration. For example, with just a fresh install, I got this problem, locally on my machine, but also in VSTS during the build step... And I'm not the only one in my company.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions