Set gon.ee in Jest

This commit is contained in:
Winnie Hellmann
2019-03-28 13:38:29 +01:00
parent 5a2d7bf245
commit 63f6fcd0b7
2 changed files with 10 additions and 9 deletions

View File

@ -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,
},
};