diff options
Diffstat (limited to 'config/karma.config.js')
-rw-r--r-- | config/karma.config.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/config/karma.config.js b/config/karma.config.js index 74dc5c13c70..e1d7c30b1c2 100644 --- a/config/karma.config.js +++ b/config/karma.config.js @@ -22,6 +22,13 @@ webpackConfig.optimization.splitChunks = false; // use quicker sourcemap option webpackConfig.devtool = 'cheap-inline-source-map'; +// set BABEL_ENV to indicate when we're running code coverage +webpackConfig.plugins.push( + new webpack.DefinePlugin({ + 'process.env.BABEL_ENV': JSON.stringify(process.env.BABEL_ENV || process.env.NODE_ENV || null), + }) +); + const specFilters = argumentsParser .option( '-f, --filter-spec [filter]', @@ -84,7 +91,7 @@ module.exports = function(config) { basePath: ROOT_PATH, browsers: ['ChromeHeadlessCustom'], client: { - color: !process.env.CI + color: !process.env.CI, }, customLaunchers: { ChromeHeadlessCustom: { |