summaryrefslogtreecommitdiff
path: root/tests/integration/coverage_tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/coverage_tests.rs')
-rw-r--r--tests/integration/coverage_tests.rs45
1 files changed, 36 insertions, 9 deletions
diff --git a/tests/integration/coverage_tests.rs b/tests/integration/coverage_tests.rs
index f6011b054..c1e5055da 100644
--- a/tests/integration/coverage_tests.rs
+++ b/tests/integration/coverage_tests.rs
@@ -547,14 +547,15 @@ fn test_summary_reporter() {
output.assert_exit_code(0);
output.skip_output_check();
- let output = context
- .new_command()
- .args_vec(vec!["coverage".to_string(), format!("{}/", tempdir)])
- .run();
-
- output.assert_exit_code(0);
- output.assert_matches_text(
- "----------------------------------
+ {
+ let output = context
+ .new_command()
+ .args_vec(vec!["coverage".to_string(), format!("{}/", tempdir)])
+ .run();
+
+ output.assert_exit_code(0);
+ output.assert_matches_text(
+ "----------------------------------
File | Branch % | Line % |
----------------------------------
bar.ts | 0.0 | 57.1 |
@@ -565,7 +566,33 @@ File | Branch % | Line % |
All files | 40.0 | 61.0 |
----------------------------------
",
- );
+ );
+ }
+
+ // test --ignore flag works
+ {
+ let output = context
+ .new_command()
+ .args_vec(vec![
+ "coverage".to_string(),
+ format!("{}/", tempdir),
+ "--ignore=**/bar.ts,**/quux.ts".to_string(),
+ ])
+ .run();
+
+ output.assert_exit_code(0);
+ output.assert_matches_text(
+ "---------------------------------
+File | Branch % | Line % |
+---------------------------------
+ baz/qux.ts | 100.0 | 100.0 |
+ foo.ts | 50.0 | 76.9 |
+---------------------------------
+ All files | 66.7 | 85.0 |
+---------------------------------
+",
+ );
+ }
}
#[test]