From 451dac9ac303f533fc421c29856abb1d49f7d02e Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Thu, 18 Oct 2018 15:58:06 -0400 Subject: [PATCH] fix: Merge excludeCoverage option creating istanbul plugin (#9) --- index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 0d77149..4389013 100644 --- a/index.js +++ b/index.js @@ -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), @@ -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); }