Skip to content

Commit 160c530

Browse files
committed
Broke up tests to be more specific.
1 parent a540b56 commit 160c530

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/testthat/test-correlation.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
library(tibble)
22

3-
test_that("epi_cor throws errors as needed",{
3+
test_that("epi_cor throws an error for a non-epi df for its first argument",{
4+
expect_error(epi_cor(1:10,1,1))
45
expect_error(epi_cor(data.frame(x=1:10),1,1))
6+
})
7+
8+
test_that("epi_cor requires two var arguments, var1 and var2",{
59
expect_error(epi_cor(archive_cases_dv_subset$DT,var2=1))
610
expect_error(epi_cor(archive_cases_dv_subset$DT,var1=1))
711
})

0 commit comments

Comments
 (0)