feat: make __coverage__
the default approach we advocate for ES2015 coverage
#268
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
related to #266
The reason that setting
include = /
makes__coverage__
compatible withnyc
is that/
results in no files matchingshouldInstrumentFile()
.When
nyc
is configured with a rule that does matchshouldInstrumentFile()
it results in the source-map information populated by__coverage__
being clobbered, breaking output.Rather than relying on this side-effect I propose that we do the following:
nyc
.nyc
instrument files (__coverage__
handles this).shouldInstrumentFile
logic into a module that can be used by bothnyc
and__coverage__
, this way folks can opt to usenyc
'sinclude
/exclude
functionality, while using__coverage__
for instrumentation.__coverage__
for ES2015 instrumentation.__coverage__
as a fix for their test-coverage issues.@jamestalmage @dtinth does this sound reasonable?