You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've had a couple issues opened on babel-plugin-istanbul related to incompatibility with babel-plugin-rewire; In a debugging session today, I finally figured out what was happening.
When both plugins are used together, an attempt is made to instrument source code files multiple times for test coverage; This results in a second line counter being added to each line in the file, but the source-code tracking object is not updated... tldr; we end up counting the wrong lines, and the counts are off by one; this results in some extremely strange behavior, see:
// the plugin rewire, as a side-effect, seems to cause// the program visitor to be run twice; in this// scenario, we should avoid instrumentinga second time.functionalreadyInstrumented(path,visitState){returnpath.scope.hasBinding(visitState.varName);}
But it feels a bit weird to have to do this; any ideas as to what might be going on -- @hzoo I know you're super busy, but perhaps you could give some insight?
The text was updated successfully, but these errors were encountered:
I've had a couple issues opened on
babel-plugin-istanbul
related to incompatibility withbabel-plugin-rewire
; In a debugging session today, I finally figured out what was happening.When both plugins are used together, an attempt is made to instrument source code files multiple times for test coverage; This results in a second line counter being added to each line in the file, but the source-code tracking object is not updated... tldr; we end up counting the wrong lines, and the counts are off by one; this results in some extremely strange behavior, see:
istanbuljs/istanbuljs#28
and
https://github.com/MartinDawson/istanbulBug
I could potentially use the following workaround:
But it feels a bit weird to have to do this; any ideas as to what might be going on -- @hzoo I know you're super busy, but perhaps you could give some insight?
The text was updated successfully, but these errors were encountered: