tests/testthat/test-pedalfast_factor.R

test_that("length(x) != 1 throws error in pedalfast_factor",
          {
            expect_error(pedalfast_factor(x = 1, variable = c("a", "b")))
            expect_error(pedalfast_factor(x = 1, variable = character(0)))
            expect_error(pedalfast_factor(x = 1, variable = 19))
          })

test_that("bad name in pedalfast_factor returns error",
          {
            expect_error(pedalfast_factor(x = 1, variable = "gcsmotore"))
          })

Try the pedalfast.data package in your browser

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

pedalfast.data documentation built on Nov. 11, 2023, 1:07 a.m.