tests/testthat/test-name_to_search_terms.R

context("test-name_to_search_terms.R")

describe("name_to_search_terms", {
  it("does not remove trailing R when proceeded by a vowel", {
    expect_equal(name_to_search_terms("linear"), "linear")
    expect_equal(name_to_search_terms("loder"), "loder")
  })
  it("does remove trailing R when not proceeded by a vowel", {
    expect_equal(name_to_search_terms("covr"), "cov")
    expect_equal(name_to_search_terms("knitr"), "knit")
  })
})

Try the available package in your browser

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

available documentation built on July 11, 2022, 1:05 a.m.