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
diff options
context:
space:
mode:
authorWinnie Hellmann <winnie@gitlab.com>2019-03-14 00:54:52 +0300
committerWinnie Hellmann <winnie@gitlab.com>2019-03-14 00:54:52 +0300
commit2ea8ebfad5c22d53aad2df1228d97a1f53c15947 (patch)
treed1bcf543eac8c01879eb934a679cdaf49d24cd28 /spec/javascripts
parent0c6e4b4c728c32923f1090eaf9927d84d7e78e36 (diff)
Move EE-specifics of Karma test bundle behind flag
Diffstat (limited to 'spec/javascripts')
-rw-r--r--spec/javascripts/test_bundle.js19
1 files changed, 11 insertions, 8 deletions
diff --git a/spec/javascripts/test_bundle.js b/spec/javascripts/test_bundle.js
index 32011375673..d736bc93d70 100644
--- a/spec/javascripts/test_bundle.js
+++ b/spec/javascripts/test_bundle.js
@@ -122,10 +122,11 @@ afterEach(() => {
const axiosDefaultAdapter = getDefaultAdapter();
// render all of our tests
-const testContexts = [
- require.context('spec', true, /_spec$/),
- require.context('ee_spec', true, /_spec$/),
-];
+const testContexts = [require.context('spec', true, /_spec$/)];
+
+if (process.env.EE) {
+ testContexts.push(require.context('ee_spec', true, /_spec$/));
+}
testContexts.forEach(context => {
context.keys().forEach(path => {
@@ -210,10 +211,12 @@ if (process.env.BABEL_ENV === 'coverage') {
];
describe('Uncovered files', function() {
- const sourceFilesContexts = [
- require.context('~', true, /\.(js|vue)$/),
- require.context('ee', true, /\.(js|vue)$/),
- ];
+ const sourceFilesContexts = [require.context('~', true, /\.(js|vue)$/)];
+
+ if (process.env.EE) {
+ sourceFilesContexts.push(require.context('ee', true, /\.(js|vue)$/));
+ }
+
const allTestFiles = testContexts.reduce(
(accumulator, context) => accumulator.concat(context.keys()),
[],