Skip to content

Commit

Permalink
Merge pull request #198 from tidymodels/no-more-expect-error
Browse files Browse the repository at this point in the history
EmilHvitfeldt authored Jan 27, 2025
2 parents 2f9313a + 3a9d564 commit 415ae25
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/testthat/test-fiting.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
test_that("fit and fit_xy errors if outcome is provided", {
expect_error(
k_means(num_clusters = 5) %>% fit_xy(mtcars),
regexp = NA
expect_no_error(
k_means(num_clusters = 5) %>% fit_xy(mtcars)
)

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

km <- k_means(num_clusters = 5)

expect_error(
workflows::workflow(~., km) %>% fit(mtcars),
regexp = NA
expect_no_error(
workflows::workflow(~., km) %>% fit(mtcars)
)
expect_snapshot(
error = TRUE,

0 comments on commit 415ae25

Please sign in to comment.