Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Invalid file coverage object, missing keys" #718

Open
GravlLift opened this issue Mar 16, 2023 · 1 comment
Open

"Invalid file coverage object, missing keys" #718

GravlLift opened this issue Mar 16, 2023 · 1 comment

Comments

@GravlLift
Copy link

The title'd error message is a bit misleading. Spent a good deal of time trying to figure out why I was getting

Invalid file coverage object, missing keys, found:path,all,statementMap,s,branchMap,b,fnMap,f

which encompasses all the keys that are checked in file-coverage.js.

Turns out that I was passing in an object that looked something like

{
  path: "",
  ...
}

... so while the path key was in fact present, it was a falsy value.

Maybe the error message could be changed to "missing or falsy" or something like that?

@yatessss
Copy link

in my case,remove workerThreads: true in jest.config.js, is worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants