From c0336fbbeaa3b5f4eab46ff672ba2804920a013e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Sat, 7 Oct 2023 18:05:57 +0200 Subject: [PATCH] chore: Split snapshots --- tests/testthat/_snaps/dm.md | 4 ++-- tests/testthat/_snaps/examine-cardinalities.md | 2 +- tests/testthat/_snaps/examine-constraints.md | 2 +- tests/testthat/test-dm.R | 4 ++++ tests/testthat/test-examine-cardinalities.R | 2 ++ tests/testthat/test-examine-constraints.R | 2 ++ 6 files changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/testthat/_snaps/dm.md b/tests/testthat/_snaps/dm.md index 3628c2206..87cb9ad9a 100644 --- a/tests/testthat/_snaps/dm.md +++ b/tests/testthat/_snaps/dm.md @@ -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()) @@ -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") %>% diff --git a/tests/testthat/_snaps/examine-cardinalities.md b/tests/testthat/_snaps/examine-cardinalities.md index 1aa0e38a5..ae9687f38 100644 --- a/tests/testthat/_snaps/examine-cardinalities.md +++ b/tests/testthat/_snaps/examine-cardinalities.md @@ -55,7 +55,7 @@ Message ! No FKs available in `dm`. ---- +# `dm_examine_cardinalities()` API (2) Code dm_examine_cardinalities(dm_test_obj(), foo = "bar") diff --git a/tests/testthat/_snaps/examine-constraints.md b/tests/testthat/_snaps/examine-constraints.md index 817075951..2289cdcce 100644 --- a/tests/testthat/_snaps/examine-constraints.md +++ b/tests/testthat/_snaps/examine-constraints.md @@ -87,7 +87,7 @@ Message i No constraints defined. ---- +# `dm_examine_constraints()` API (2) Code dm_examine_constraints(dm_test_obj(), foo = "bar") diff --git a/tests/testthat/test-dm.R b/tests/testthat/test-dm.R index fc0bee9ba..e090a9393 100644 --- a/tests/testthat/test-dm.R +++ b/tests/testthat/test-dm.R @@ -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() }) diff --git a/tests/testthat/test-examine-cardinalities.R b/tests/testthat/test-examine-cardinalities.R index 0c65f260b..d3d62ca01 100644 --- a/tests/testthat/test-examine-cardinalities.R +++ b/tests/testthat/test-examine-cardinalities.R @@ -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") }) diff --git a/tests/testthat/test-examine-constraints.R b/tests/testthat/test-examine-constraints.R index 51e81e7d4..d7f6649d9 100644 --- a/tests/testthat/test-examine-constraints.R +++ b/tests/testthat/test-examine-constraints.R @@ -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") })