tests/testthat/test-add_lkm.R

context("test-add_lkm")

test_that("add_lkm works", {
  expect_equal(as.numeric(add_lkm(1)),1)
})

test_that("add_lkm works", {
  expect_equal(add_lkm(matrix(1, ncol = 10))$V1[1],
               units::set_units(1, "km"))
})

test_that("add_lkm works", {
  expect_equal(add_lkm(as.data.frame(matrix(1, ncol = 10)))$V1[1],
               units::set_units(1, "km"))
})

Try the vein package in your browser

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

vein documentation built on May 29, 2024, 7:20 a.m.