Allow instrumentation of transformed files with weird file extensions#9589
Allow instrumentation of transformed files with weird file extensions#9589SimenB merged 2 commits intojestjs:masterfrom
Conversation
SimenB
left a comment
There was a problem hiding this comment.
Thanks! This makes sense to me. Could you add an integration test as well? We have some for coverage already
|
Okay, I’ve added my example project as an integration test. |
This comment has been minimized.
This comment has been minimized.
SimenB
left a comment
There was a problem hiding this comment.
Perfect, thank you! Just running prettier/eslint on the one file and we should be good to go 🙂
917b8f0 to
b6b8308
Compare
|
Just to make sure I did the right thing here: I added an exemption to I left the copyright header on |
|
I honestly have no idea what the header is for, but just adding the header seems easiest. The blacklist is for stuff like vendored modules and config files, I think, but this is code (albeit tests) |
Codecov Report
@@ Coverage Diff @@
## master #9589 +/- ##
==========================================
+ Coverage 65.06% 65.07% +0.01%
==========================================
Files 286 287 +1
Lines 12137 12141 +4
Branches 3007 3008 +1
==========================================
+ Hits 7897 7901 +4
Misses 3605 3605
Partials 635 635
Continue to review full report at Codecov.
|
b6b8308 to
70fd2de
Compare
|
Eh, I guess I’m willing to claim to be an “affiliate” for this purpose. Updated. |
This comment has been minimized.
This comment has been minimized.
d8714fe to
80077a9
Compare
Codecov Report
@@ Coverage Diff @@
## master #9589 +/- ##
==========================================
- Coverage 65.06% 65.06% -0.01%
==========================================
Files 286 287 +1
Lines 12137 12141 +4
Branches 3007 3010 +3
==========================================
+ Hits 7897 7899 +2
- Misses 3605 3606 +1
- Partials 635 636 +1
Continue to review full report at Codecov.
|
The default configuration of babel-plugin-istanbul only allows instrumentation of files with extensions .js, .cjs, .mjs, .ts, .tsx, .jsx (https://github.com/istanbuljs/schema/blob/v0.1.2/index.js#L71). However, we know that we’re running it on code that we just transformed to JavaScript, so the source language no longer matters, and we should disable this check to get complete instrumentation. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
80077a9 to
443734c
Compare
This comment has been minimized.
This comment has been minimized.
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
The default configuration of
babel-plugin-istanbulonly allows instrumentation of files with extensions.js,.cjs,.mjs,.ts,.tsx,.jsx(https://github.com/istanbuljs/schema/blob/v0.1.2/index.js#L71). However, we know that we’re running it on code that we just transformed to JavaScript, so the source language no longer matters, and we should disable this check to get complete instrumentation.Test plan
With the example project at https://github.com/andersk/jest-handlebars-test, before:
and after: