diff --git a/tests/testthat.R b/tests/testthat.R index 6baee84357..d05a2052ea 100644 --- a/tests/testthat.R +++ b/tests/testthat.R @@ -1,6 +1,3 @@ -library(dplyr) -library(tern) - pkg_name <- "teal.modules.clinical" library(pkg_name, character.only = TRUE) testthat::test_check(pkg_name) diff --git a/tests/testthat/_snaps/utils.md b/tests/testthat/_snaps/utils.md index 3fa5556eff..7349c31aa4 100644 --- a/tests/testthat/_snaps/utils.md +++ b/tests/testthat/_snaps/utils.md @@ -3,7 +3,7 @@ Code res Output - [1] "rtables::basic_table() %>% rtables::split_cols_by(var = \"ARMCD\") %>% test_proportion_diff(vars = \"rsp\", method = \"cmh\", variables = list(strata = \"strat\")) %>% rtables::build_table(df = dta)" + [1] "rtables::basic_table() %>% rtables::split_cols_by(var = \"ARMCD\") %>% tern::test_proportion_diff(vars = \"rsp\", method = \"cmh\", variables = list(strata = \"strat\")) %>% rtables::build_table(df = dta)" # add_expr adds expressions to expression list @@ -17,7 +17,7 @@ rtables::split_cols_by(var = arm) [[3]] - test_proportion_diff(vars = "rsp", method = "cmh", variables = list(strata = "strat")) + tern::test_proportion_diff(vars = "rsp", method = "cmh", variables = list(strata = "strat")) [[4]] rtables::build_table(df = dta) @@ -39,7 +39,7 @@ Output { anl <- subset(adrs, PARAMCD == "INVET") - anl$rsp_lab <- d_onco_rsp_label(anl$AVALC) + anl$rsp_lab <- tern::d_onco_rsp_label(anl$AVALC) anl$is_rsp <- anl$rsp_lab %in% c("Complete Response (CR)", "Partial Response (PR)") } diff --git a/tests/testthat/test-utils.R b/tests/testthat/test-utils.R index 59eefaf91b..d65759ba6e 100644 --- a/tests/testthat/test-utils.R +++ b/tests/testthat/test-utils.R @@ -2,7 +2,7 @@ testthat::test_that("h_concat_expr returns a string for long expression", { expr <- quote( rtables::basic_table() %>% rtables::split_cols_by(var = "ARMCD") %>% - test_proportion_diff( + tern::test_proportion_diff( vars = "rsp", method = "cmh", variables = list(strata = "strat") ) %>% rtables::build_table(df = dta) @@ -33,7 +33,7 @@ testthat::test_that("add_expr adds expressions to expression list", { lyt <- add_expr( lyt, substitute( - test_proportion_diff( + tern::test_proportion_diff( vars = "rsp", method = "cmh", variables = list(strata = "strat") ) ) @@ -70,7 +70,7 @@ expr1 <- substitute( expr = anl <- subset(df, PARAMCD == param), env = list(df = as.name("adrs"), param = "INVET") ) -expr2 <- substitute(expr = anl$rsp_lab <- d_onco_rsp_label(anl$AVALC)) +expr2 <- substitute(expr = anl$rsp_lab <- tern::d_onco_rsp_label(anl$AVALC)) expr3 <- substitute( expr = anl$is_rsp <- anl$rsp_lab %in% c("Complete Response (CR)", "Partial Response (PR)")