File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,8 @@ NYC.prototype._createInstrumenter = function () {
140
140
produceSourceMap : this . config . produceSourceMap ,
141
141
compact : this . config . compact ,
142
142
preserveComments : this . config . preserveComments ,
143
- esModules : this . config . esModules
143
+ esModules : this . config . esModules ,
144
+ plugins : this . config . plugins
144
145
} )
145
146
}
146
147
Original file line number Diff line number Diff line change @@ -4,8 +4,11 @@ var convertSourceMap = require('convert-source-map')
4
4
var mergeSourceMap = require ( 'merge-source-map' )
5
5
6
6
function InstrumenterIstanbul ( cwd , options ) {
7
+ const plugins = options . plugins
8
+ const configPlugins = plugins ? { plugins } : { }
9
+
7
10
var istanbul = InstrumenterIstanbul . istanbul ( )
8
- var instrumenter = istanbul . createInstrumenter ( {
11
+ var instrumenter = istanbul . createInstrumenter ( Object . assign ( {
9
12
autoWrap : true ,
10
13
coverageVariable : '__coverage__' ,
11
14
embedSource : true ,
@@ -14,7 +17,7 @@ function InstrumenterIstanbul (cwd, options) {
14
17
produceSourceMap : options . produceSourceMap ,
15
18
ignoreClassMethods : options . ignoreClassMethods ,
16
19
esModules : options . esModules
17
- } )
20
+ } , configPlugins ) )
18
21
19
22
return {
20
23
instrumentSync : function ( code , filename , sourceMap ) {
You can’t perform that action at this time.
0 commit comments