Skip to content

Commit

Permalink
stem_words.r tested
Browse files Browse the repository at this point in the history
  • Loading branch information
jriley-dhsc committed Dec 2, 2024
1 parent 6aabbaa commit b748e24
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/testthat/test-stem_words.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
test_that("stemming works", {
x <- c("win", "winning", "winner", NA)

# test with no exceptions

expect_equal(stem_words(x), c("win", "win", "winner", NA))

# test with single exception
expect_equal(
stem_words(x, exceptions = "winning"),
c("win", "winning", "winner", NA)
)
})

0 comments on commit b748e24

Please sign in to comment.