summaryrefslogtreecommitdiff
path: root/spec/frontend/helpers
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2019-07-17 17:47:33 -0500
committerMike Greiling <mike@pixelcog.com>2019-07-19 02:27:14 -0500
commit89142f985deaff5cd60db0a95f05b646641f6f04 (patch)
tree1f8d726e2af1201091dabc3fe4da47140b13ba18 /spec/frontend/helpers
parentfaa17d526371a34325705b8de9594e4e9df03298 (diff)
downloadgitlab-ce-89142f985deaff5cd60db0a95f05b646641f6f04.tar.gz
Move frontend fixtures to tmp/tests
Diffstat (limited to 'spec/frontend/helpers')
-rw-r--r--spec/frontend/helpers/fixtures.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/frontend/helpers/fixtures.js b/spec/frontend/helpers/fixtures.js
index 09d91e963fd..778196843db 100644
--- a/spec/frontend/helpers/fixtures.js
+++ b/spec/frontend/helpers/fixtures.js
@@ -4,7 +4,10 @@ import path from 'path';
import { ErrorWithStack } from 'jest-util';
export function getFixture(relativePath) {
- const absolutePath = path.join(global.fixturesBasePath, relativePath);
+ const basePath = relativePath.startsWith('static/')
+ ? global.staticFixturesBasePath
+ : global.fixturesBasePath;
+ const absolutePath = path.join(basePath, relativePath);
if (!fs.existsSync(absolutePath)) {
throw new ErrorWithStack(
`Fixture file ${relativePath} does not exist.