summaryrefslogtreecommitdiff
path: root/app
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
parentbb41a889487463f626796a390148ae7870c16824 (diff)
downloadgitlab-ce-eefd17437c201418b7336493eb320a129a5b8abe.tar.gz
remove the "test" bundle and apply it conditionally within main.jsremove-test-bundle
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/main.js7
-rw-r--r--app/assets/javascripts/test.js1
-rw-r--r--app/views/layouts/_head.html.haml1
3 files changed, 5 insertions, 4 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();
diff --git a/app/assets/javascripts/test.js b/app/assets/javascripts/test.js
deleted file mode 100644
index c4c7918a68f..00000000000
--- a/app/assets/javascripts/test.js
+++ /dev/null
@@ -1 +0,0 @@
-$.fx.off = true;
diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml
index 0c979109b3f..b981b5fdafa 100644
--- a/app/views/layouts/_head.html.haml
+++ b/app/views/layouts/_head.html.haml
@@ -42,7 +42,6 @@
= webpack_bundle_tag "common"
= webpack_bundle_tag "main"
= webpack_bundle_tag "raven" if Gitlab::CurrentSettings.clientside_sentry_enabled
- = webpack_bundle_tag "test" if Rails.env.test?
- if content_for?(:page_specific_javascripts)
= yield :page_specific_javascripts