tests/testthat/test-mymemory_translate.R

test_that("translation works", {
  expect_equal(
    mymemory_translate(
      text = "Hello",
      target_language = "nl",
      source_language = "en"
    ),
    "Hallo"
  )
})

Try the polyglotr package in your browser

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

polyglotr documentation built on June 8, 2025, 11:12 a.m.