summaryrefslogtreecommitdiff
path: root/jest.config.js
diff options
context:
space:
mode:
authorWinnie Hellmann <winnie@gitlab.com>2019-03-28 13:38:29 +0100
committerWinnie Hellmann <winnie@gitlab.com>2019-03-28 18:17:10 +0100
commit63f6fcd0b7876b74f7d42f3c787a8fdb53a264e2 (patch)
treec7d9221300efb0bd942266f28dbe99a90b080707 /jest.config.js
parent5a2d7bf245aea165a2569916e8419e76c5715fda (diff)
downloadgitlab-ce-63f6fcd0b7876b74f7d42f3c787a8fdb53a264e2.tar.gz
Set gon.ee in Jestwinh-jest-gon
Diffstat (limited to 'jest.config.js')
-rw-r--r--jest.config.js13
1 files changed, 4 insertions, 9 deletions
diff --git a/jest.config.js b/jest.config.js
index 4cdc16adc16..c7518be9e96 100644
--- a/jest.config.js
+++ b/jest.config.js
@@ -1,12 +1,4 @@
-
-const fs = require('fs');
-const path = require('path');
-
-const ROOT_PATH = __dirname;
-const IS_EE =
- process.env.EE !== undefined
- ? JSON.parse(process.env.EE)
- : fs.existsSync(path.join(ROOT_PATH, 'ee'));
+const IS_EE = require('./config/helpers/is_ee_env');
const reporters = ['default'];
@@ -46,4 +38,7 @@ module.exports = {
transformIgnorePatterns: ['node_modules/(?!(@gitlab/ui)/)'],
timers: 'fake',
testEnvironment: '<rootDir>/spec/frontend/environment.js',
+ testEnvironmentOptions: {
+ IS_EE,
+ },
};