summaryrefslogtreecommitdiff
path: root/spec/frontend/environment.js
diff options
context:
space:
mode:
authorWinnie Hellmann <winnie@gitlab.com>2019-04-25 11:49:06 +0200
committerWinnie Hellmann <winnie@gitlab.com>2019-05-02 23:11:18 +0200
commitfbac16b2de4b715a85dfd2b79768079d12229bc1 (patch)
tree5cd08edf46399c869b30d3cf2c5c78022726427c /spec/frontend/environment.js
parent6e3165f0b4bcbb12d88b653df7f6b66349b7b375 (diff)
downloadgitlab-ce-winh-separate-frontend-fixtures.tar.gz
Load EE fixtures from ee/ directory in Jestwinh-separate-frontend-fixtures
(cherry picked from commit 2917a28a885922a03f2026ddbb2680bc2b6e5d50)
Diffstat (limited to 'spec/frontend/environment.js')
-rw-r--r--spec/frontend/environment.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/frontend/environment.js b/spec/frontend/environment.js
index 34df8019a2e..9612162ad0c 100644
--- a/spec/frontend/environment.js
+++ b/spec/frontend/environment.js
@@ -24,8 +24,9 @@ class CustomEnvironment extends JSDOMEnvironment {
});
const { testEnvironmentOptions } = config;
+ const { IS_EE } = testEnvironmentOptions;
this.global.gon = {
- ee: testEnvironmentOptions.IS_EE,
+ ee: IS_EE,
};
this.rejectedPromises = [];
@@ -33,6 +34,10 @@ class CustomEnvironment extends JSDOMEnvironment {
this.global.promiseRejectionHandler = error => {
this.rejectedPromises.push(error);
};
+
+ this.global.fixturesBasePath = `${process.cwd()}/${
+ IS_EE ? 'ee/' : ''
+ }spec/javascripts/fixtures`;
}
async teardown() {