Skip to content

Commit

Permalink
Don't fail if no rows in traceability matrix (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
walkowif authored Jun 3, 2024
1 parent 40cb2f0 commit dd23aab
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions template.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,15 @@ if (require("covtracer", quietly = TRUE)) {
dplyr::mutate(file = paste0("``` ", file, " ```")) %>%
dplyr::select(`Test Description` = test_name, Documentation = file)
tt(
tt_covtracer_df,
caption = "Tracebility matrix mapping unit tests to documented behaviours.",
theme = "striped"
)
if (nrow(tt_covtracer_df) > 0) {
tt(
tt_covtracer_df,
caption = "Tracebility matrix mapping unit tests to documented behaviours.",
theme = "striped"
)
} else {
cat("No test suites.")
}
} else {
cat("{covtracer} not available to produce a traceability matrix")
}
Expand Down

0 comments on commit dd23aab

Please sign in to comment.