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
test(instrument): should return unmodified source if no transform found (#1036)
* Test that the instrument command returns unmodified source if there is no transform found for a file extension.
Currently this behaviour can only be reached when trying to instrument a single file.
In the case of instrumenting a directory, files with an extension with no matching transform are filtered out before they can be instrumented.
* Cleanup instrumentation code again with a focus on paths
The main aim of this has been to clarify whether we're working with relative or absolute file paths, and removing unnecessary transformations. Although I've made a few other 'small' changes here and there.
Key changes:
* Created a new private method `NYC._transform`, common to `_maybeInstrumentSource` and `instrumentAllFiles`.
* Renamed the param in `walkAllFiles` forEach handler to `relFile` to explicitly state the file representation being used.
* Let the `addAllFiles` visitor function rely on `testExclude` to determine which files to instrument
0 commit comments