diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2019-04-25 12:48:54 +0300 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2019-05-03 00:11:18 +0300 |
commit | 6e3165f0b4bcbb12d88b653df7f6b66349b7b375 (patch) | |
tree | fc77c8f9f88cd8c238993d0d56b53900dc0ddd2a /config/karma.config.js | |
parent | 1542904541494fdb4ffec29c5ca83c0eac9b8c97 (diff) |
Load EE fixtures from ee/ directory in Karma
(cherry picked from commit 7cde57bf7367bce130a2e7f149c8dafd362de3f8)
Diffstat (limited to 'config/karma.config.js')
-rw-r--r-- | config/karma.config.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/config/karma.config.js b/config/karma.config.js index dfcb5c4646e..83ba46345f2 100644 --- a/config/karma.config.js +++ b/config/karma.config.js @@ -4,6 +4,7 @@ const chalk = require('chalk'); const webpack = require('webpack'); const argumentsParser = require('commander'); const webpackConfig = require('./webpack.config.js'); +const IS_EE = require('./helpers/is_ee_env'); const ROOT_PATH = path.resolve(__dirname, '..'); const SPECS_PATH = /^(?:\.[\\\/])?(ee[\\\/])?spec[\\\/]javascripts[\\\/]/; @@ -90,6 +91,8 @@ if (specFilters.length) { module.exports = function(config) { process.env.TZ = 'Etc/UTC'; + const fixturesPath = `${IS_EE ? 'ee/' : ''}spec/javascripts/fixtures`; + const karmaConfig = { basePath: ROOT_PATH, browsers: ['ChromeHeadlessCustom'], @@ -110,7 +113,7 @@ module.exports = function(config) { frameworks: ['jasmine'], files: [ { pattern: 'spec/javascripts/test_bundle.js', watched: false }, - { pattern: `spec/javascripts/fixtures/**/*@(.json|.html|.png|.bmpr|.pdf)`, included: false }, + { pattern: `${fixturesPath}/**/*@(.json|.html|.png|.bmpr|.pdf)`, included: false }, ], preprocessors: { 'spec/javascripts/**/*.js': ['webpack', 'sourcemap'], |