Skip to content

Commit

Permalink
Theme element unit tests (#2081)
Browse files Browse the repository at this point in the history
* init theme elements test suite

* added unit tests for pkgwide theme elements

* added DS feedback

* nitpick format changes

* Update test-theme_elements_gtsummary.R

* theming unit test updates

---------

Co-authored-by: Daniel Sjoberg <[email protected]>
  • Loading branch information
Meghansaha and ddsjoberg authored Dec 27, 2024
1 parent e58dd03 commit 1c21e9c
Show file tree
Hide file tree
Showing 5 changed files with 240 additions and 146 deletions.
Binary file modified R/sysdata.rda
Binary file not shown.
11 changes: 6 additions & 5 deletions R/tbl_survfit.R
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,12 @@ tbl_survfit.list <- function(x,
)
}
if (missing(statistic)) {
get_theme_element(
"tbl_survfit-arg:statistic",
default =
paste0("{estimate} ({conf.low}", get_theme_element("pkgwide-str:ci.sep", default = ", "), "{conf.high})")
)
statistic <-
get_theme_element(
"tbl_survfit-arg:statistic",
default =
paste0("{estimate} ({conf.low}", get_theme_element("pkgwide-str:ci.sep", default = ", "), "{conf.high})")
)
}
check_string(statistic)
if (is_string(label)) label <- inject(everything() ~ !!label)
Expand Down
Loading

0 comments on commit 1c21e9c

Please sign in to comment.