Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ fill_in <- function(list, names) {
}

output_dir <- function() {
opt <- getOption("valreport_output_dir", default = NULL)
env <- Sys.getenv("VALREPORT_OUTPUT_DIR", unset = getwd())

opt %||% env
getOption("valreport_output_dir",
default = Sys.getenv("VALREPORT_OUTPUT_DIR",
unset = getwd()
)
)
}

rendering_dir <- function() {
Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/_snaps/card.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Card is created with the expected components depending on arguments: only has title if no other argument is set
# Card is created with the expected components depending on arguments / only has title if no other argument is set

Code
create_info_card("test title")
Expand All @@ -7,7 +7,7 @@
<h3 class="card-title">test title</h3>
</div>

# Card is created with the expected components depending on arguments: has title and header
# Card is created with the expected components depending on arguments / has title and header

Code
create_info_card(title = "test title", header = "Information header")
Expand All @@ -17,7 +17,7 @@
<h3 class="card-title">test title</h3>
</div>

# Card is created with the expected components depending on arguments: has all arguments set
# Card is created with the expected components depending on arguments / has all arguments set

Code
create_info_card(title = "test title", header = "Information header", text = "Extra test")
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/render_table.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Namespace table is created: It is created by without error from existing example package assessment
# Namespace table is created / It is created by without error from existing example package assessment

Code
prepare_namespace_table(example_assessment)
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ test_that("include_exclude_from works", {
})

test_that("All riskmetric:::pkg_ref_class_hierarchy have value to display in our report", {
allowed_names <- unlist(riskmetric:::pkg_ref_class_hierarchy)
allowed_names <- unlist(riskmetric::pkg_ref_class_hierarchy)

expect_true(all(!is.na(sapply(allowed_names, get_pkg_origin))))
})
Expand Down
Loading