Skip to content

Commit

Permalink
Update test-one-sample.R
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil committed Aug 10, 2024
1 parent 4979ec9 commit 8832cca
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions tests/testthat/test-one-sample.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
run_one_sample_tests_with_parameters <- function(title, x, test.value) {
patrick::with_parameters_test_that(title,
cases_data <- tidyr::expand_grid(
type = c("bayes", "parametric", "nonparametric", "robust"),
conf.level = c(0.95, 0.90)
) %>%
dplyr::mutate(
effsize.type = rep_len(c("g", "d"), length.out = nrow(.)) # relevant only for parametric
)

patrick::with_parameters_test_that(
title,
{
set.seed(123L)
res <- one_sample_test(
Expand All @@ -23,13 +32,7 @@ run_one_sample_tests_with_parameters <- function(title, x, test.value) {
expect_snapshot(res$bf10[[1L]])
}
},
.cases = tidyr::expand_grid(
type = c("bayes", "parametric", "nonparametric", "robust"),
conf.level = c(0.95, 0.90)
) %>%
dplyr::mutate(
effsize.type = rep_len(c("g", "d"), length.out = nrow(.)) # relevant only for parametric
)
.cases = cases_data
)
}

Expand Down

0 comments on commit 8832cca

Please sign in to comment.