Open m-orchard opened 8 years ago
I see the failure, I'll try to get that sorted.
Tests fixed. If you can offer any guidance on whether/how you want to test config being passed down, that would be great, but either way I will try to find time to write some.
I don't have much time to review these patches these days, and it seems like the other maintainers don't either. In the past @felixge has been willing to add new collaborators for cases like this; would that work for you?
I'd be happy to add @mickylad as a collaborator.
Super slow response, sorry! I'm happy to be added as a contributor if you want - anything you need from me?
@mickylad slow reply from me too :). I need your npm user name so I can add you as an owner.
@felixge itsmickylad
- just signed up! :)
@mickylad added you on GH and NPM.
Hey,
We needed the ability to configure the istanbul transformer, specifically so we could tell it to use of ES6 modules when requiring (by passing through
esModules: true
).I thought this might the best and most backwards compatible way of doing it - you can now specify configuration when registering a built-in transformer, and calling register for the same transformer after that will simply override the previous configuration. For the coffee transform, this configuration is passed straight into the
compile
call, and for istanbul this configuration is copied, then used to help detect if coverage is running (in case a customcoverageVariable
is specified), then passed into the instrumentation call.You can see I've not added any unit tests - I'll be honest, I wasn't sure the best way to test this. At least for the istanbul transformer, the instrumentation doesn't appear to be mocked, so there's not a nice way to check whether config is passed on. If you would like tests to be added I'd be happy to, with a little guidance.
Cheers!