Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
86030267
Commit
86030267
authored
Apr 22, 2016
by
Ehtesham
Committed by
Usman Khalid
Apr 22, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
making preprocessor files path absolute to have coverage reporter include file only once
parent
51bf39fc
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
36 deletions
+30
-36
cms/static/karma_cms.conf.js
+1
-9
cms/static/karma_cms_squire.conf.js
+1
-9
common/static/common/js/karma.common.conf.js
+22
-0
common/static/karma_common.conf.js
+2
-0
common/static/karma_common_requirejs.conf.js
+2
-0
lms/static/karma_lms.conf.js
+1
-9
lms/static/karma_lms_coffee.conf.js
+1
-9
No files found.
cms/static/karma_cms.conf.js
View file @
86030267
...
...
@@ -114,15 +114,7 @@ var runAndConfigFiles = [
// do not include tests or libraries
// (these files will be instrumented by Istanbul)
var
preprocessors
=
(
function
()
{
var
preprocessFiles
=
{};
_
.
flatten
([
sourceFiles
,
specFiles
]).
forEach
(
function
(
file
)
{
var
pattern
=
_
.
isObject
(
file
)
?
file
.
pattern
:
file
;
preprocessFiles
[
pattern
]
=
[
'coverage'
];
});
return
preprocessFiles
;
}());
var
preprocessors
=
configModule
.
getPreprocessorObject
(
_
.
flatten
([
sourceFiles
,
specFiles
]));
module
.
exports
=
function
(
config
)
{
var
commonConfig
=
configModule
.
getConfig
(
config
),
...
...
cms/static/karma_cms_squire.conf.js
View file @
86030267
...
...
@@ -102,15 +102,7 @@ var runAndConfigFiles = [
// do not include tests or libraries
// (these files will be instrumented by Istanbul)
var
preprocessors
=
(
function
()
{
var
preprocessFiles
=
{};
_
.
flatten
([
sourceFiles
,
specFiles
]).
forEach
(
function
(
file
)
{
var
pattern
=
_
.
isObject
(
file
)
?
file
.
pattern
:
file
;
preprocessFiles
[
pattern
]
=
[
'coverage'
];
});
return
preprocessFiles
;
}());
var
preprocessors
=
configModule
.
getPreprocessorObject
(
_
.
flatten
([
sourceFiles
,
specFiles
]));
module
.
exports
=
function
(
config
)
{
var
commonConfig
=
configModule
.
getConfig
(
config
),
...
...
common/static/common/js/karma.common.conf.js
View file @
86030267
// Common configuration for Karma
/* jshint node: true */
/*jshint -W079 */
'use strict'
;
var
path
=
require
(
'path'
);
var
_
=
require
(
'underscore'
);
var
appRoot
=
path
.
join
(
__dirname
,
'../../../../'
);
/**
...
...
@@ -100,6 +102,25 @@ function junitSettings(config) {
};
}
var
getPreprocessorObject
=
function
(
files
)
{
var
preprocessFiles
=
{};
files
.
forEach
(
function
(
file
)
{
var
pattern
=
_
.
isObject
(
file
)
?
file
.
pattern
:
file
;
if
(
pattern
.
match
(
/^common
\/
js/
))
{
pattern
=
path
.
join
(
appRoot
,
'/common/static/'
+
pattern
)
}
else
if
(
pattern
.
match
(
/^xmodule_js
\/
common_static/
))
{
pattern
=
path
.
join
(
appRoot
,
'/common/static/'
+
pattern
.
replace
(
/^xmodule_js
\/
common_static
\/
/
,
''
));
}
preprocessFiles
[
pattern
]
=
[
'coverage'
];
});
return
preprocessFiles
;
};
var
getConfig
=
function
(
config
,
useRequireJs
)
{
useRequireJs
=
useRequireJs
===
undefined
?
true
:
useRequireJs
;
...
...
@@ -216,5 +237,6 @@ var getConfig = function (config, useRequireJs) {
module
.
exports
=
{
getConfig
:
getConfig
,
getPreprocessorObject
:
getPreprocessorObject
,
appRoot
:
appRoot
};
common/static/karma_common.conf.js
View file @
86030267
...
...
@@ -80,8 +80,10 @@ var fixtureFiles = [
// (these files will be instrumented by Istanbul)
var
preprocessors
=
(
function
()
{
var
preprocessFiles
=
{};
_
.
flatten
([
sourceFiles
,
specFiles
]).
forEach
(
function
(
file
)
{
var
pattern
=
_
.
isObject
(
file
)
?
file
.
pattern
:
file
;
pattern
=
path
.
join
(
configModule
.
appRoot
,
'/common/static/'
+
pattern
);
preprocessFiles
[
pattern
]
=
[
'coverage'
];
});
...
...
common/static/karma_common_requirejs.conf.js
View file @
86030267
...
...
@@ -74,8 +74,10 @@ var runAndConfigFiles = [
// (these files will be instrumented by Istanbul)
var
preprocessors
=
(
function
()
{
var
preprocessFiles
=
{};
_
.
flatten
([
sourceFiles
,
specFiles
]).
forEach
(
function
(
file
)
{
var
pattern
=
_
.
isObject
(
file
)
?
file
.
pattern
:
file
;
pattern
=
path
.
join
(
configModule
.
appRoot
,
'/common/static/'
+
pattern
);
preprocessFiles
[
pattern
]
=
[
'coverage'
];
});
...
...
lms/static/karma_lms.conf.js
View file @
86030267
...
...
@@ -128,15 +128,7 @@ var runAndConfigFiles = [
// do not include tests or libraries
// (these files will be instrumented by Istanbul)
var
preprocessors
=
(
function
()
{
var
preprocessFiles
=
{};
_
.
flatten
([
sourceFiles
,
specFiles
]).
forEach
(
function
(
file
)
{
var
pattern
=
_
.
isObject
(
file
)
?
file
.
pattern
:
file
;
preprocessFiles
[
pattern
]
=
[
'coverage'
];
});
return
preprocessFiles
;
}());
var
preprocessors
=
configModule
.
getPreprocessorObject
(
_
.
flatten
([
sourceFiles
,
specFiles
]));
module
.
exports
=
function
(
config
)
{
var
commonConfig
=
configModule
.
getConfig
(
config
),
...
...
lms/static/karma_lms_coffee.conf.js
View file @
86030267
...
...
@@ -80,15 +80,7 @@ var fixtureFiles = [
// do not include tests or libraries
// (these files will be instrumented by Istanbul)
var
preprocessors
=
(
function
()
{
var
preprocessFiles
=
{};
_
.
flatten
([
sourceFiles
,
specFiles
]).
forEach
(
function
(
file
)
{
var
pattern
=
_
.
isObject
(
file
)
?
file
.
pattern
:
file
;
preprocessFiles
[
pattern
]
=
[
'coverage'
];
});
return
preprocessFiles
;
}());
var
preprocessors
=
configModule
.
getPreprocessorObject
(
_
.
flatten
([
sourceFiles
,
specFiles
]));
module
.
exports
=
function
(
config
)
{
var
commonConfig
=
configModule
.
getConfig
(
config
,
false
),
...
...
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