Skip to content

Commit ac1dc88

Browse files
committed
test update
1 parent 7c07c87 commit ac1dc88

2 files changed

Lines changed: 8 additions & 12 deletions

File tree

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
# ard_stats_mood_test() works
22

33
Code
4-
as.data.frame(ard_stats_mood_test(cards::ADSL, by = SEX, variable = AGE))
4+
as.data.frame(ard_stats_mood_test(cards::ADSL[1:10, ], by = SEX, variable = AGE))
55
Output
6-
group1 variable context stat_name stat_label
7-
1 SEX AGE stats_mood_test statistic Z-Statistic
8-
2 SEX AGE stats_mood_test p.value p-value
9-
3 SEX AGE stats_mood_test method method
10-
4 SEX AGE stats_mood_test alternative Alternative Hypothesis
11-
stat fmt_fun warning error
12-
1 0.1292194 1 NULL NULL
13-
2 0.8971841 1 NULL NULL
14-
3 Mood two-sample test of scale NULL NULL NULL
15-
4 two.sided NULL NULL NULL
6+
group1 variable context stat_name stat_label stat fmt_fun warning error
7+
1 SEX AGE stats_mood_test statistic Z-Statistic 0.6741999 1 NULL NULL
8+
2 SEX AGE stats_mood_test p.value p-value 0.5001843 1 NULL NULL
9+
3 SEX AGE stats_mood_test method method Mood two-sample test of scale NULL NULL NULL
10+
4 SEX AGE stats_mood_test alternative Alternative Hypothesis two.sided NULL NULL NULL
1611

tests/testthat/test-ard_stats_mood_test.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
skip_if_pkg_not_installed("broom")
22

33
test_that("ard_stats_mood_test() works", {
4+
withr::local_options(list(width = 150))
45
expect_error(
56
ard_moodtest <-
67
cards::ADSL |>
@@ -20,7 +21,7 @@ test_that("ard_stats_mood_test() works", {
2021

2122
# errors are properly handled
2223
expect_snapshot(
23-
cards::ADSL |>
24+
cards::ADSL[1:10, ] |>
2425
ard_stats_mood_test(by = SEX, variable = AGE) |>
2526
as.data.frame()
2627
)

0 commit comments

Comments
 (0)