-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
--all not reporting coverage for all files. #333
Comments
@kentcdodds EDIT: it's not, my bad. |
@kentcdodds istanbuljs/babel-plugin-istanbul#4 would love to figure out a good approach for this. |
Referenced to get nyc/istanbul reporting properly with tests transpiled inline: https://github.com/react-bootstrap/react-prop-types (as of v0.4.0) Note on source maps: Source map support comes with `mocha --compilers js:babel-register`, which seems to enable source maps to work in tests but not in the compiled output. Adding `import 'source-map-support/register'` to the src enables source maps to work in compiled code but break in tests. Including source-map-support in src and requiring source-map-support before babel-register when running mocha (instead of passing the compilers option) appears to get both. Referenced to get source maps working in test and compiled output: evanw/node-source-map-support#121 Notes on coverage: nyc's "--all" option to include reports for files that are not required is currently not working with babel-plugin-istanbul, but they're aware of the matter. Also, including reporter settings in the nyc stanza of package.json appear to trample command line options, so those were moved to the npm test script instead. Related issues: istanbuljs/nyc#333 istanbuljs/babel-plugin-istanbul#4
Referenced to get nyc/istanbul reporting properly with tests transpiled inline: https://github.com/react-bootstrap/react-prop-types (as of v0.4.0) Note on source maps: Source map support comes with `mocha --compilers js:babel-register`, which seems to enable source maps to work in tests but not in the compiled output. Adding `import 'source-map-support/register'` to the src enables source maps to work in compiled code but break in tests. Including source-map-support in src and requiring source-map-support before babel-register when running mocha (instead of passing the compilers option) appears to get both. Referenced to get source maps working in test and compiled output: evanw/node-source-map-support#121 Notes on coverage: nyc's "--all" option to include reports for files that are not required is currently not working with babel-plugin-istanbul, but they're aware of the matter. Also, including reporter settings in the nyc stanza of package.json appear to trample command line options, so those were moved to the npm test script instead. Related issues: istanbuljs/nyc#333 istanbuljs/babel-plugin-istanbul#4
AFAIK the all option only works if nyc is doing the instrumentation itself, not if the instrumentation is done outside of nyc, like the babel plugin. |
@danez I believe that's been fixed too... unless I'm remembering wrong I've got it working in a couple projects. See the config section of the README. EDIT: & try |
@JaKXz I just tested with https://github.com/researchgate/webpack-watchman-plugin but only two files show up in the coverage report out of 5. The config is exactly like it is in the README, except the |
@JaKXz, @danez istanbuljs/babel-plugin-istanbul#4 Long story short, since we skip the instrumentation step in |
Right. Let's move the discussion there then to avoid more duplicating :) |
@JaKXz @kentcdodds I could still use help with documenting the feature better, but we now have the core bits and pieces in place to support |
Here's an example. I've dug through the nyc code locally for over an hour and can't quite figure out what's going on, but if I add a file called
foo.js
in thesrc
directory, it doesn't appear in the report :-( Any ideas?The text was updated successfully, but these errors were encountered: