From 324828399df901a79d166b29a9945a0e79fab67b Mon Sep 17 00:00:00 2001 From: Robert Devine <> Date: Wed, 21 Feb 2024 12:07:01 -0500 Subject: [PATCH] Lintr tidying commit using testthat(3e) snapshot feature to unit test the format, helper, adam_functions in pilot3utils. --- tests/testthat/test-helpers.r | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/testthat/test-helpers.r b/tests/testthat/test-helpers.r index 8b1a16c..9c66752 100644 --- a/tests/testthat/test-helpers.r +++ b/tests/testthat/test-helpers.r @@ -21,7 +21,7 @@ test_that("pad_row works", { "TEST01", "01-701-1015", "SYSBP", "Systolic Blood Pressure (mmHg)", "WEEK 2", "TEST01", "01-701-1028", "DIABP", "Diastolic Blood Pressure (mmHg)", "BASELINE", "TEST01", "01-701-1028", "SYSBP", "Systolic Blood Pressure (mmHg)", "BASELINE", - "","","","","" + "", "", "", "", "" ) expect_equal(nrow(pad_row(.data)), 7) expect_equal(nrow(pad_row(.data, n = 3)), 9) @@ -45,8 +45,8 @@ test_that("num_fmt works", { test_that("str_pad works", { .data_str_pad <- tibble::tribble( - ~OUTPUT, - " pilot3" + ~OUTPUT, + " pilot3" ) expect_equal(str_pad("pilot3", 7, "left"), " pilot3") expect_snapshot(str_pad("pilot3", 7, "left"), dplyr::select(.data_str_pad))