Skip to content

Commit

Permalink
test-format-report.R: trigger covr failure case
Browse files Browse the repository at this point in the history
format_appendix() has a good amount of conditional handling.  Add a
test to make sure the covr failure arm isn't unintentionally made
unreachable by upstream changes.
  • Loading branch information
kyleam committed Aug 12, 2024
1 parent 00231b9 commit 24bdf6a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/testthat/test-format-report.R
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,18 @@ describe("formatting functions", {
)
})

it("format_appendix: covr failure", {
expect_output(
format_appendix(
list(
check_output = "anything",
cov_results_df = list(code_file = "File coverage failed")
)
),
"Calculating code coverage failed"
)
})

it("dependency versions", {
setups <- pkg_dirs$pkg_setups_df

Expand Down

0 comments on commit 24bdf6a

Please sign in to comment.