Closed karchjd closed 1 month ago
we are getting all passes on our unit tests here ...
It seems like I should have been more specific. Have a look at lines 90 to 116:
testthat::test_that('Error is thrown if grouping var has more than 2 levels', {
df <- data.frame(
dep = c(1, 7, 4),
group = c("a", "b", "c"),
stringsAsFactors = TRUE
)
testthat::expect_error(
jmv::ttestIS(df, vars = "dep", group = "group"),
"Grouping variable 'group' must have exactly 2 levels",
fixed=TRUE
)
})
testthat::test_that('Error is thrown if grouping var has more than 2 levels', {
df <- data.frame(
dep = c(1, 7, 4),
group = c("a", "b", "c"),
stringsAsFactors = TRUE
)
testthat::expect_error(
jmv::ttestIS(df, vars = "dep", group = "group"),
"Grouping variable 'group' must have exactly 2 levels",
fixed=TRUE
)
})
The unit tests contain exactly the same test twice. Not really a problem but just wanted to let you know,
Well, that took us a lot longer to fix than necessary 😛. Thank you for reporting this though!
The test 'Error is thrown if grouping var has more than 2 levels' is twice in the file.