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
39f32f98
Commit
39f32f98
authored
May 05, 2016
by
Usman Khalid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplified normalizePathsForCoverage.
parent
2839a42e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
common/static/common/js/karma.common.conf.js
+15
-15
No files found.
common/static/common/js/karma.common.conf.js
View file @
39f32f98
...
...
@@ -124,24 +124,24 @@ function junitSettings(config) {
};
}
var
normalizePathsForCoverage
=
function
(
files
,
normalize_func
)
{
var
filesForCoverage
=
{};
var
defaultNormalizeFunc
=
function
(
appRoot
,
pattern
)
{
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
\/
/
,
''
));
}
return
pattern
;
};
var
normalizePathsForCoverage
=
function
(
files
,
normalizeFunc
)
{
var
normalizeFn
=
normalizeFunc
||
defaultNormalizeFunc
,
filesForCoverage
=
{};
files
.
forEach
(
function
(
file
)
{
if
(
_
.
isObject
(
file
)
&&
file
.
ignoreCoverage
)
{
return
;
}
var
pattern
=
_
.
isObject
(
file
)
?
file
.
pattern
:
file
;
if
(
normalize_func
)
{
pattern
=
normalize_func
(
appRoot
,
pattern
);
}
else
{
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
\/
/
,
''
));
}
if
(
!
file
.
ignoreCoverage
)
{
filesForCoverage
[
normalizeFn
(
appRoot
,
file
.
pattern
)]
=
[
'coverage'
];
}
filesForCoverage
[
pattern
]
=
[
'coverage'
];
});
return
filesForCoverage
;
...
...
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