From ff7eed834055f5271be79910efc225b7db5fb8fc Mon Sep 17 00:00:00 2001 From: Sam El-Kamand Date: Thu, 28 Nov 2024 21:12:42 +1100 Subject: [PATCH] fix: added locale to test to attempt to debug why CI tests are failing --- tests/testthat/test-gg1d.R | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/testthat/test-gg1d.R b/tests/testthat/test-gg1d.R index 2bcbe9b..35a1e1c 100644 --- a/tests/testthat/test-gg1d.R +++ b/tests/testthat/test-gg1d.R @@ -198,8 +198,13 @@ test_that("gg1d heirarchical sort works", { gg1d(data = mock_data, col_sort = c("Category2", "Logical"), sort_type = "alphabetical", desc = FALSE, order_matches_sort = TRUE, return = "data", verbose = FALSE) ) - # Snapshot with desc = FALSE - expect_snapshot( - gg1d(data = mock_data, col_sort = c("Category2", "Logical"), sort_type = "alphabetical", desc = TRUE, order_matches_sort = TRUE, return = "data", verbose = FALSE) + withr::with_locale( + c(LC_COLLATE = "C"), + # Snapshot with desc = FALSE + expect_snapshot( + gg1d(data = mock_data, col_sort = c("Category2", "Logical"), sort_type = "alphabetical", desc = TRUE, order_matches_sort = TRUE, return = "data", verbose = FALSE) + ) ) + + })