summaryrefslogtreecommitdiff
path: root/config/karma.config.js
diff options
context:
space:
mode:
authorLukas Eipert <git@leipert.io>2018-04-10 11:12:24 +0200
committerLukas Eipert <git@leipert.io>2018-04-10 11:12:24 +0200
commit35d754f6e571717523f11f6dcfe4e13ce508adf9 (patch)
tree9b2dd6b2205d220d5e420a3b6f79a5cbdfc4acbd /config/karma.config.js
parent8e66411488e87d59dde65c690892d9495292fe86 (diff)
downloadgitlab-ce-35d754f6e571717523f11f6dcfe4e13ce508adf9.tar.gz
read which testfiles to run from CLI
Diffstat (limited to 'config/karma.config.js')
-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 3be4d5220f4..083a640b3ed 100644
--- a/config/karma.config.js
+++ b/config/karma.config.js
@@ -16,9 +16,14 @@ if (webpackConfig.plugins) {
webpackConfig.plugins = [];
}
+var ignoreUpTo = process.argv.indexOf('config/karma.config.js') + 1;
+var testFiles = process.argv.slice(ignoreUpTo).filter(arg => {
+ return !arg.startsWith('--');
+});
+
webpackConfig.plugins.push(
new webpack.DefinePlugin({
- TEST_FILE: JSON.stringify(process.env.TEST_FILE),
+ TEST_FILES: JSON.stringify(testFiles),
})
);