Skip to content

Commit 7265993

Browse files
committed
Add test to check HTML output, too
1 parent 88c0688 commit 7265993

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/test/java/org/utplsql/cli/RunCommandCoverageReporterIT.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,13 @@ public void coverageReporterWriteAssetsToOutput() throws Exception {
111111

112112
runCmd.run();
113113

114+
// Check application file exists
114115
File applicationJs = coverageAssetsPath.resolve(Paths.get("application.js")).toFile();
115-
116116
assertTrue(applicationJs.exists());
117117

118-
118+
// Check correct script-part in HTML source exists
119+
String content = new Scanner(coveragePath).useDelimiter("\\Z").next();
120+
assertTrue(content.contains("<script src='" + coverageAssetsPath.toString() + "/application.js' type='text/javascript'>"));
119121
}
120122

121123
@AfterEach

0 commit comments

Comments
 (0)