Skip to content

Commit

Permalink
fix: Merge excludeCoverage option creating istanbul plugin (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonocasey authored Oct 18, 2018
1 parent 35fce1b commit 451dac9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ const getSettings = function(options) {
// get babel settings from the users provided function or use the defaults
settings.babel = options.babel ? options.babel(defaultBabel()) : defaultBabel();

if (options.excludeCoverage) {
settings.excludeCoverage = options.excludeCoverage(settings.excludeCoverage);
}

// primed plugins
settings.primedPlugins = {
babel: babel(settings.babel),
Expand All @@ -190,10 +194,6 @@ const getSettings = function(options) {
istanbul: istanbul({exclude: settings.excludeCoverage})
};

if (options.excludeCoverage) {
settings.excludeCoverage = options.excludeCoverage(settings.excludeCoverage);
}

if (options.primedPlugins) {
settings.primedPlugins = options.primedPlugins(settings.primedPlugins);
}
Expand Down

0 comments on commit 451dac9

Please sign in to comment.