Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6e3165f0
Commit
6e3165f0
authored
Apr 25, 2019
by
Winnie Hellmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Load EE fixtures from ee/ directory in Karma
(cherry picked from commit 7cde57bf7367bce130a2e7f149c8dafd362de3f8)
parent
15429045
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
config/karma.config.js
config/karma.config.js
+4
-1
spec/javascripts/test_constants.js
spec/javascripts/test_constants.js
+3
-1
No files found.
config/karma.config.js
View file @
6e3165f0
...
@@ -4,6 +4,7 @@ const chalk = require('chalk');
...
@@ -4,6 +4,7 @@ const chalk = require('chalk');
const
webpack
=
require
(
'
webpack
'
);
const
webpack
=
require
(
'
webpack
'
);
const
argumentsParser
=
require
(
'
commander
'
);
const
argumentsParser
=
require
(
'
commander
'
);
const
webpackConfig
=
require
(
'
./webpack.config.js
'
);
const
webpackConfig
=
require
(
'
./webpack.config.js
'
);
const
IS_EE
=
require
(
'
./helpers/is_ee_env
'
);
const
ROOT_PATH
=
path
.
resolve
(
__dirname
,
'
..
'
);
const
ROOT_PATH
=
path
.
resolve
(
__dirname
,
'
..
'
);
const
SPECS_PATH
=
/^
(?:\.[\\\/])?(
ee
[\\\/])?
spec
[\\\/]
javascripts
[\\\/]
/
;
const
SPECS_PATH
=
/^
(?:\.[\\\/])?(
ee
[\\\/])?
spec
[\\\/]
javascripts
[\\\/]
/
;
...
@@ -90,6 +91,8 @@ if (specFilters.length) {
...
@@ -90,6 +91,8 @@ if (specFilters.length) {
module
.
exports
=
function
(
config
)
{
module
.
exports
=
function
(
config
)
{
process
.
env
.
TZ
=
'
Etc/UTC
'
;
process
.
env
.
TZ
=
'
Etc/UTC
'
;
const
fixturesPath
=
`
${
IS_EE
?
'
ee/
'
:
''
}
spec/javascripts/fixtures`
;
const
karmaConfig
=
{
const
karmaConfig
=
{
basePath
:
ROOT_PATH
,
basePath
:
ROOT_PATH
,
browsers
:
[
'
ChromeHeadlessCustom
'
],
browsers
:
[
'
ChromeHeadlessCustom
'
],
...
@@ -110,7 +113,7 @@ module.exports = function(config) {
...
@@ -110,7 +113,7 @@ module.exports = function(config) {
frameworks
:
[
'
jasmine
'
],
frameworks
:
[
'
jasmine
'
],
files
:
[
files
:
[
{
pattern
:
'
spec/javascripts/test_bundle.js
'
,
watched
:
false
},
{
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
:
{
preprocessors
:
{
'
spec/javascripts/**/*.js
'
:
[
'
webpack
'
,
'
sourcemap
'
],
'
spec/javascripts/**/*.js
'
:
[
'
webpack
'
,
'
sourcemap
'
],
...
...
spec/javascripts/test_constants.js
View file @
6e3165f0
export
const
FIXTURES_PATH
=
'
/base/spec/javascripts/fixtures
'
;
export
const
FIXTURES_PATH
=
`/base/
${
process
.
env
.
IS_GITLAB_EE
?
'
ee/
'
:
''
}
spec/javascripts/fixtures`
;
export
const
TEST_HOST
=
'
http://test.host
'
;
export
const
TEST_HOST
=
'
http://test.host
'
;
export
const
DUMMY_IMAGE_URL
=
`
${
FIXTURES_PATH
}
/static/images/one_white_pixel.png`
;
export
const
DUMMY_IMAGE_URL
=
`
${
FIXTURES_PATH
}
/static/images/one_white_pixel.png`
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment