Skip to content

Commit

Permalink
chore: Split snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Oct 7, 2023
1 parent 2b9383a commit c0336fb
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/_snaps/dm.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
Primary keys: 16
Foreign keys: 14

---
# output for dm() with dm (2)

Code
dm(dm_for_filter(), dm_for_flatten(), dm_for_filter())
Expand All @@ -154,7 +154,7 @@
* "tf_5" at locations 5 and 16.
* ...

---
# output for dm() with dm (3)

Code
dm(dm_for_filter(), dm_for_flatten(), dm_for_filter(), .name_repair = "unique") %>%
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/examine-cardinalities.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
Message
! No FKs available in `dm`.

---
# `dm_examine_cardinalities()` API (2)

Code
dm_examine_cardinalities(dm_test_obj(), foo = "bar")
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/examine-constraints.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
Message
i No constraints defined.

---
# `dm_examine_constraints()` API (2)

Code
dm_examine_constraints(dm_test_obj(), foo = "bar")
Expand Down
4 changes: 4 additions & 0 deletions tests/testthat/test-dm.R
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,15 @@ test_that("output for dm() with dm", {
dm(dm_for_filter()) %>% collect()
dm(dm_for_filter(), dm_for_flatten(), dm_for_filter(), .name_repair = "unique", .quiet = TRUE) %>% collect()
})
})

test_that("output for dm() with dm (2)", {
expect_snapshot(error = TRUE, {
dm(dm_for_filter(), dm_for_flatten(), dm_for_filter())
})
})

test_that("output for dm() with dm (3)", {
expect_snapshot({
dm(dm_for_filter(), dm_for_flatten(), dm_for_filter(), .name_repair = "unique") %>% collect()
})
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-examine-cardinalities.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ test_that("`dm_examine_cardinalities()` API", {
dm_examine_cardinalities(dm_test_obj(), progress = FALSE)
dm_examine_cardinalities(dm = dm_test_obj())
})
})

test_that("`dm_examine_cardinalities()` API (2)", {
expect_snapshot(error = TRUE, {
dm_examine_cardinalities(dm_test_obj(), foo = "bar")
})
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-examine-constraints.R
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ test_that("`dm_examine_constraints()` API", {
dm_examine_constraints(dm_test_obj(), progress = FALSE)
dm_examine_constraints(dm = dm_test_obj())
})
})

test_that("`dm_examine_constraints()` API (2)", {
expect_snapshot(error = TRUE, {
dm_examine_constraints(dm_test_obj(), foo = "bar")
})
Expand Down

0 comments on commit c0336fb

Please sign in to comment.