Skip to content

Commit

Permalink
add snapshot test
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpcouch committed Dec 18, 2023
1 parent 079e427 commit 5de4385
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/testthat/_snaps/fair-aaa.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# metric factory print method works

Code
equal_opportunity
Output
A metric factory (`?yardstick::new_groupwise_metric()`)

# handles `direction` input

Code
Expand Down
4 changes: 4 additions & 0 deletions tests/testthat/test-fair-aaa.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ test_that("new_groupwise_metric() works with grouped input", {
expect_identical(grouped_res, split_res)
})

test_that("metric factory print method works", {
expect_snapshot(equal_opportunity)
})

test_that("can accommodate redundant sensitive features", {
data("hpc_cv")

Expand Down

0 comments on commit 5de4385

Please sign in to comment.