tests/testthat/test_clean_strings.R

test_that("clean strings removes replacements", {
  names <- c("abc corp", "abc corporation")
  cleaned <- clean_strings(names, common_words = data.table(word = "corp",
                                                            replacement = "corporation"),
                           remove_words = T)
  expect_identical(cleaned, c("abc", "abc"))
})
seunglee98/fedmatch documentation built on April 26, 2024, 10:24 a.m.