tests/testthat/test-preprocess-error.R

test_that("preprocess_table errors with duplicate columns", {
  df <- read_one_table("../data/preproc.csv")

  mock_preproc_spec <- list(
    grouping_column = "id",
    preprocess = list(
      on = c("id", "group"),
      retain_min = "start_date",
      retain_max = "start_date"
    )
  )

  expect_error(
    preprocess_table(df, mock_preproc_spec),
    regexp = "multiple"
  )
})

Try the eider package in your browser

Any scripts or data that you put into this service are public.

eider documentation built on May 29, 2024, 7:27 a.m.