summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/main.js
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2018-02-28 15:22:15 -0600
committerMike Greiling <mike@pixelcog.com>2018-03-01 15:11:46 -0600
commiteefd17437c201418b7336493eb320a129a5b8abe (patch)
tree297575e5f028bb075ce9b5a3169f2a56fa4a0596 /app/assets/javascripts/main.js
parentbb41a889487463f626796a390148ae7870c16824 (diff)
downloadgitlab-ce-eefd17437c201418b7336493eb320a129a5b8abe.tar.gz
remove the "test" bundle and apply it conditionally within main.jsremove-test-bundle
Diffstat (limited to 'app/assets/javascripts/main.js')
-rw-r--r--app/assets/javascripts/main.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/assets/javascripts/main.js b/app/assets/javascripts/main.js
index 659dc9eaa1f..53b01cca1d3 100644
--- a/app/assets/javascripts/main.js
+++ b/app/assets/javascripts/main.js
@@ -36,8 +36,11 @@ import initBreadcrumbs from './breadcrumb';
import initDispatcher from './dispatcher';
-// eslint-disable-next-line global-require, import/no-commonjs
-if (process.env.NODE_ENV !== 'production') require('./test_utils/');
+// inject test utilities if necessary
+if (process.env.NODE_ENV !== 'production' && gon && gon.test_env) {
+ $.fx.off = true;
+ import(/* webpackMode: "eager" */ './test_utils/');
+}
svg4everybody();