nyc merge in nyc@next gives 'Invalid file coverage object, missing keys, found:data'
See original GitHub issueLink to bug demonstration repository
git clone https://github.com/akoidan/vue-webpack-typescript
git checkout multicov
yarn install
yarn test
Expected Behavior
- tests are merged, no errors
Observed Behavior
commands in example will run multiple test and then tries to run nyc merge
that would fail with error:
'Invalid file coverage object, missing keys, found:data'
To be specific
yarn run test:unit
yarn nyc merge ./nyc/.nyc_output_unit/ ./nyc/.nyc_output/unit.json
results a json like this:
{
"/home/andrew/WebstormProjects/vue-webpack-typescript/src/utils/classComponentHooks.ts": {
"data": {
"path": "/home/andrew/WebstormProjects/vue-webpack-typescript/src/utils/classComponentHooks.ts",
"statementMap": {
"0": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 8,
"column": 3
}
}
},
"fnMap": {},
"branchMap": {},
"s": {
"0": 0
},
"f": {},
"b": {},
"all": true
}
}
}
Environment Information
npx: installed 1 in 0.76s
System:
OS: Linux 5.3 Arch Linux undefined
CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
Memory: 5.92 GB / 31.25 GB
Binaries:
Node: 12.13.0 - /usr/bin/node
Yarn: 1.19.1 - /usr/bin/yarn
npm: 6.12.1 - /usr/bin/npm
npmPackages:
@babel/plugin-proposal-class-properties: 7.7.0 => 7.7.0
@babel/plugin-proposal-decorators: 7.7.0 => 7.7.0
@babel/preset-env: 7.7.1 => 7.7.1
babel-loader: 8.0.6 => 8.0.6
babel-plugin-istanbul: 5.2.0 => 5.2.0
babel-preset-typescript-vue: 1.0.2 => 1.0.2
istanbul-lib-coverage: 2.0.5 => 2.0.5
nyc: ^15.0.0-beta.0 => 15.0.0-beta.0
source-map-support: 0.5.16 => 0.5.16
ts-node: 8.5.2 => 8.5.2
typescript: 3.7.2 => 3.7.2
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Resolving “Invalid file coverage object, missing keys, found ...
Resolving “Invalid file coverage object, missing keys, found:data” for NYC. If you are merging two NYC coverage reports, for example your Cypress and...
Read more >nyc merge in nyc@next gives 'Invalid file coverage object ...
nyc merge in nyc@next gives 'Invalid file coverage object, missing keys, found:data'
Read more >Invalid file coverage object, missing keys, found:data
Invalid file coverage object, missing keys, found:data ... has an unnecessary data property for some files, which is breaking merge.
Read more >node-npmtest-nyc/nyc/node_modules/istanbul-lib-coverage/lib
... if (!valid) { throw new Error('Invalid file coverage object, missing keys, found:' + Object.keys(obj).join(',')); } } /** * provides a ...
Read more >NYCNext - Rebuild the Next New York City
New Yorkers on a mission to support and rebuild New York City.Here's a chance to share your love and energy to rebuild the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m running into this issue as well.
@akoidan I’m very busy so I have to ask for your patience.