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
2ea8ebfa
Commit
2ea8ebfa
authored
Mar 13, 2019
by
Winnie Hellmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move EE-specifics of Karma test bundle behind flag
parent
0c6e4b4c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
config/webpack.config.js
config/webpack.config.js
+4
-0
spec/javascripts/test_bundle.js
spec/javascripts/test_bundle.js
+11
-8
No files found.
config/webpack.config.js
View file @
2ea8ebfa
...
...
@@ -324,6 +324,10 @@ module.exports = {
reportFilename
:
path
.
join
(
ROOT_PATH
,
'
webpack-report/index.html
'
),
statsFilename
:
path
.
join
(
ROOT_PATH
,
'
webpack-report/stats.json
'
),
}),
new
webpack
.
DefinePlugin
({
'
process.env.EE
'
:
JSON
.
stringify
(
IS_EE
),
}),
].
filter
(
Boolean
),
devServer
:
{
...
...
spec/javascripts/test_bundle.js
View file @
2ea8ebfa
...
...
@@ -122,10 +122,11 @@ afterEach(() => {
const
axiosDefaultAdapter
=
getDefaultAdapter
();
// render all of our tests
const
testContexts
=
[
require
.
context
(
'
spec
'
,
true
,
/_spec$/
),
require
.
context
(
'
ee_spec
'
,
true
,
/_spec$/
),
];
const
testContexts
=
[
require
.
context
(
'
spec
'
,
true
,
/_spec$/
)];
if
(
process
.
env
.
EE
)
{
testContexts
.
push
(
require
.
context
(
'
ee_spec
'
,
true
,
/_spec$/
));
}
testContexts
.
forEach
(
context
=>
{
context
.
keys
().
forEach
(
path
=>
{
...
...
@@ -210,10 +211,12 @@ if (process.env.BABEL_ENV === 'coverage') {
];
describe
(
'
Uncovered files
'
,
function
()
{
const
sourceFilesContexts
=
[
require
.
context
(
'
~
'
,
true
,
/
\.(
js|vue
)
$/
),
require
.
context
(
'
ee
'
,
true
,
/
\.(
js|vue
)
$/
),
];
const
sourceFilesContexts
=
[
require
.
context
(
'
~
'
,
true
,
/
\.(
js|vue
)
$/
)];
if
(
process
.
env
.
EE
)
{
sourceFilesContexts
.
push
(
require
.
context
(
'
ee
'
,
true
,
/
\.(
js|vue
)
$/
));
}
const
allTestFiles
=
testContexts
.
reduce
(
(
accumulator
,
context
)
=>
accumulator
.
concat
(
context
.
keys
()),
[],
...
...
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