Skip to content

Commit 3a9d564

Browse files
committed
no more expect_error()
1 parent c9edff9 commit 3a9d564

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

tests/testthat/test-fiting.R

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
test_that("fit and fit_xy errors if outcome is provided", {
2-
expect_error(
3-
k_means(num_clusters = 5) %>% fit_xy(mtcars),
4-
regexp = NA
2+
expect_no_error(
3+
k_means(num_clusters = 5) %>% fit_xy(mtcars)
54
)
65

76
expect_snapshot(
@@ -12,9 +11,8 @@ test_that("fit and fit_xy errors if outcome is provided", {
1211

1312
km <- k_means(num_clusters = 5)
1413

15-
expect_error(
16-
workflows::workflow(~., km) %>% fit(mtcars),
17-
regexp = NA
14+
expect_no_error(
15+
workflows::workflow(~., km) %>% fit(mtcars)
1816
)
1917
expect_snapshot(
2018
error = TRUE,

0 commit comments

Comments
 (0)