Skip to content

Commit

Permalink
Lintr tidying commit using testthat(3e) snapshot feature to unit test…
Browse files Browse the repository at this point in the history
… the format, helper, adam_functions in pilot3utils.
  • Loading branch information
Robert Devine committed Feb 21, 2024
1 parent 4bfeb4c commit 3248283
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/testthat/test-helpers.r
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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))
Expand Down

0 comments on commit 3248283

Please sign in to comment.