Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2018-10-02 22:58:39 +0300
committerMike Greiling <mike@pixelcog.com>2018-10-02 23:15:43 +0300
commit1efed5d3892618f0161506d1bade19738c418c64 (patch)
tree9b2ea76202777233c74bb89f349b691ca242bfcc /config
parent63bc9a60c5e43c38733c9b9dc6ae0669c9cc4515 (diff)
parent47a87fbcd80e416a45b87499f5b6f9052990c1aa (diff)
Merge remote-tracking branch 'origin/psimyn-speedup-karma' into 43511-upgrade-to-babel-7
* origin/psimyn-speedup-karma: Fix lint and comments Speed up karma runs for development
Diffstat (limited to 'config')
-rw-r--r--config/karma.config.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/config/karma.config.js b/config/karma.config.js
index 74dc5c13c70..cad3c0e9193 100644
--- a/config/karma.config.js
+++ b/config/karma.config.js
@@ -6,6 +6,7 @@ const argumentsParser = require('commander');
const webpackConfig = require('./webpack.config.js');
const ROOT_PATH = path.resolve(__dirname, '..');
+const GENERATE_COVERAGE_REPORT = process.env.BABEL_ENV === 'coverage' || process.env.NODE_ENV === 'coverage';
function fatalError(message) {
console.error(chalk.red(`\nError: ${message}\n`));
@@ -22,6 +23,10 @@ webpackConfig.optimization.splitChunks = false;
// use quicker sourcemap option
webpackConfig.devtool = 'cheap-inline-source-map';
+webpackConfig.plugins.push(
+ new webpack.DefinePlugin({ GENERATE_COVERAGE_REPORT }),
+);
+
const specFilters = argumentsParser
.option(
'-f, --filter-spec [filter]',
@@ -118,7 +123,7 @@ module.exports = function(config) {
};
}
- if (process.env.BABEL_ENV === 'coverage' || process.env.NODE_ENV === 'coverage') {
+ if (GENERATE_COVERAGE_REPORT) {
karmaConfig.reporters.push('coverage-istanbul');
karmaConfig.coverageIstanbulReporter = {
reports: ['html', 'text-summary'],