Skip to content

Commit

Permalink
Use correct testing function
Browse files Browse the repository at this point in the history
  • Loading branch information
NeuroShepherd committed Nov 14, 2024
1 parent 8ea1ccd commit 9a8435d
Showing 1 changed file with 26 additions and 23 deletions.
49 changes: 26 additions & 23 deletions tests/testthat/test-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,42 +51,45 @@ test_that("data object names are consistent", {
})



#### PLOT TESTS



test_that("test the plot_power() function", {

plot_obj <- simulation_data_two_groups %>%
select(Wilcoxon:`Coin Indep. Test`, sample_size) %>%
calculate_power_t2error() %>%
plot_power()

layers <- layer_data(plot_obj)

expect_equal()


})
expect_match(plot_obj$labels$x, "Sample Size")
# expect_match(plot_obj$labels$y, "Power (1-\U03B2)")
expect_match(plot_obj$labels$title, "Estimated Power")
expect_match(plot_obj$labels$colour, "Statistical Test")
expect_match(plot_obj$labels$ymin, "lower_power_bound")
expect_match(plot_obj$labels$ymax, "upper_power_bound")



#### PLOT TESTS

plot_obj <- simulation_data_two_groups %>%
select(Wilcoxon:`Coin Indep. Test`, sample_size) %>%
plot_distribution_results()

test_that("test the plot_distribution_results() function labels", {

expect_equal(plot_obj$labels$x, "Sample Size")
expect_equal(plot_obj$labels$y, "Power (1-\U03B2)")
expect_equal(plot_obj$labels$title, "Estimated Power")
expect_equal(plot_obj$labels$colour, "Statistical Test")
expect_equal(plot_obj$labels$ymin, "lower_power_bound")
expect_equal(plot_obj$labels$ymax, "upper_power_bound")

})


test_that("test the plot_distribution_results() function data", {



})
# plot_obj <- simulation_data_two_groups %>%
# select(Wilcoxon:`Coin Indep. Test`, sample_size) %>%
# plot_distribution_results()
#
# test_that("test the plot_distribution_results() function labels", {
#
#
# })
#
#
# test_that("test the plot_distribution_results() function data", {
#
#
#
# })

0 comments on commit 9a8435d

Please sign in to comment.