From e2faf50375a0e764fe3cf76d1462830f2062270d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20Czerniawski?=
<33061335+lczerniawski@users.noreply.github.com>
Date: Wed, 14 Aug 2024 09:37:19 +0200
Subject: feat(coverage): add breadcrumbs to deno coverage `--html` report
(#24860)
---
tests/integration/coverage_tests.rs | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
(limited to 'tests/integration/coverage_tests.rs')
diff --git a/tests/integration/coverage_tests.rs b/tests/integration/coverage_tests.rs
index c5f8b1453..9509ddcb7 100644
--- a/tests/integration/coverage_tests.rs
+++ b/tests/integration/coverage_tests.rs
@@ -516,7 +516,7 @@ fn test_html_reporter() {
output.assert_matches_text("HTML coverage report has been generated at [WILDCARD]/cov/html/index.html\n");
let index_html = tempdir.join("html").join("index.html").read_to_string();
- assert_contains!(index_html, "
Coverage report for all files
");
+ assert_contains!(index_html, "All files
");
assert_contains!(index_html, "baz/");
assert_contains!(index_html, "href='baz/index.html'");
assert_contains!(index_html, "foo.ts");
@@ -525,13 +525,19 @@ fn test_html_reporter() {
assert_contains!(index_html, "href='bar.ts.html'");
let foo_ts_html = tempdir.join("html").join("foo.ts.html").read_to_string();
- assert_contains!(foo_ts_html, "Coverage report for foo.ts
");
+ assert_contains!(
+ foo_ts_html,
+ ""
+ );
// Check that line count has correct title attribute
assert_contains!(foo_ts_html, "x1");
assert_contains!(foo_ts_html, "x3");
let bar_ts_html = tempdir.join("html").join("bar.ts.html").read_to_string();
- assert_contains!(bar_ts_html, "Coverage report for bar.ts
");
+ assert_contains!(
+ bar_ts_html,
+ ""
+ );
// Check in source code is escaped to <T>
assert_contains!(bar_ts_html, "<T>");
// Check that line anchors are correctly referenced by line number links
@@ -543,7 +549,10 @@ fn test_html_reporter() {
.join("baz")
.join("index.html")
.read_to_string();
- assert_contains!(baz_index_html, "Coverage report for baz/
");
+ assert_contains!(
+ baz_index_html,
+ ""
+ );
assert_contains!(baz_index_html, "qux.ts");
assert_contains!(baz_index_html, "href='qux.ts.html'");
assert_contains!(baz_index_html, "quux.ts");
@@ -554,7 +563,7 @@ fn test_html_reporter() {
.join("baz")
.join("qux.ts.html")
.read_to_string();
- assert_contains!(baz_qux_ts_html, "Coverage report for baz/qux.ts
");
+ assert_contains!(baz_qux_ts_html, "");
let baz_quux_ts_html = tempdir
.join("html")
@@ -563,7 +572,7 @@ fn test_html_reporter() {
.read_to_string();
assert_contains!(
baz_quux_ts_html,
- "Coverage report for baz/quux.ts
"
+ ""
);
}
--
cgit v1.2.3