summaryrefslogtreecommitdiff
path: root/cli/tests/integration
diff options
context:
space:
mode:
authorYoshiya Hinosawa <stibium121@gmail.com>2023-12-11 19:24:20 +0900
committerGitHub <noreply@github.com>2023-12-11 19:24:20 +0900
commit073e341faf1ef56afb5a00061bf116c9ed3b3f13 (patch)
tree803aed5381911b923e8ad326eb68f6290b5b6c28 /cli/tests/integration
parente9ab9ba9f0c47f01ebc41f3013b3f78962aaeca7 (diff)
fix(coverage): escape source code in html coverage report (#21531)
Diffstat (limited to 'cli/tests/integration')
-rw-r--r--cli/tests/integration/coverage_tests.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/cli/tests/integration/coverage_tests.rs b/cli/tests/integration/coverage_tests.rs
index 3317020fb..d3affd4de 100644
--- a/cli/tests/integration/coverage_tests.rs
+++ b/cli/tests/integration/coverage_tests.rs
@@ -553,6 +553,8 @@ fn test_html_reporter() {
let bar_ts_html =
fs::read_to_string(tempdir.join("html").join("bar.ts.html")).unwrap();
assert!(bar_ts_html.contains("<h1>Coverage report for bar.ts</h1>"));
+ // Check <T> in source code is escaped to &lt;T&gt;
+ assert!(bar_ts_html.contains("&lt;T&gt;"));
let baz_index_html =
fs::read_to_string(tempdir.join("html").join("baz").join("index.html"))