Skip to content

Commit

Permalink
test(middleware-code-coverage): add more integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
d3xter666 committed Sep 11, 2023
1 parent fbac9fb commit 839e1db
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/middleware-code-coverage/test/integration/boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,16 @@ test.serial("Coverage report is generated and available", async (t) => {
"HTML Report is not a real coverage page"
);
});

test.serial("Coverage report is unavailable", async (t) => {
const {app} = t.context;

await app.post("/.ui5/coverage/report", globalCoverageMap);

const nonExistingReportReportResponse = await app.get("/.ui5/coverage/report/cobertura");
t.true(nonExistingReportReportResponse.status >= 400, "cobertura report has not been generated");
t.falsy(
nonExistingReportReportResponse.text.includes("<title>Code coverage report"),
"A non coverage report page is returned"
);
});

0 comments on commit 839e1db

Please sign in to comment.