From fbac16b2de4b715a85dfd2b79768079d12229bc1 Mon Sep 17 00:00:00 2001 From: Winnie Hellmann Date: Thu, 25 Apr 2019 11:49:06 +0200 Subject: Load EE fixtures from ee/ directory in Jest (cherry picked from commit 2917a28a885922a03f2026ddbb2680bc2b6e5d50) --- spec/frontend/environment.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'spec/frontend/environment.js') 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() { -- cgit v1.2.1