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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
bfb82f8a
Commit
bfb82f8a
authored
Feb 11, 2017
by
winniehell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include all files with 0% coverage in report
parent
b48d30e4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
spec/javascripts/test_bundle.js
spec/javascripts/test_bundle.js
+35
-0
No files found.
spec/javascripts/test_bundle.js
View file @
bfb82f8a
...
...
@@ -42,3 +42,38 @@ testsContext.keys().forEach(function (path) {
});
}
});
// workaround: include all source files to find files with 0% coverage
// see also https://github.com/deepsweet/istanbul-instrumenter-loader/issues/15
describe
(
'
Uncovered files
'
,
function
()
{
// the following files throw errors because of undefined variables
const
troubleMakers
=
[
'
./blob_edit/blob_edit_bundle.js
'
,
'
./cycle_analytics/components/stage_plan_component.js
'
,
'
./cycle_analytics/components/stage_staging_component.js
'
,
'
./cycle_analytics/components/stage_test_component.js
'
,
'
./diff_notes/components/jump_to_discussion.js
'
,
'
./diff_notes/components/resolve_count.js
'
,
'
./merge_conflicts/components/inline_conflict_lines.js
'
,
'
./merge_conflicts/components/parallel_conflict_lines.js
'
,
'
./network/branch_graph.js
'
,
];
const
sourceFiles
=
require
.
context
(
'
~
'
,
true
,
/^
\.\/(?!
application
\.
js
)
.*
\.(
js|es6
)
$/
);
sourceFiles
.
keys
().
forEach
(
function
(
path
)
{
// ignore if there is a matching spec file
if
(
testsContext
.
keys
().
indexOf
(
`
${
path
.
replace
(
/
\.
js
(\.
es6
)?
$/
,
''
)}
_spec`
)
>
-
1
)
{
return
;
}
it
(
`includes '
${
path
}
'`
,
function
()
{
try
{
sourceFiles
(
path
);
}
catch
(
err
)
{
if
(
troubleMakers
.
indexOf
(
path
)
===
-
1
)
{
expect
(
err
).
toBeNull
();
}
}
});
});
});
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