tests/testthat/test-4.R

library(ConR)
data(dataset.ex)
dataset.ex <- dataset.ex[dataset.ex$tax == "species_1",]

context("Test that locations.comp outputs are correct length and objects")

test_that("locations.comp", {
  
  locations <- locations.comp(dataset.ex, show_progress = FALSE)
  
  testthat::expect_equal(class(locations), "list")
  testthat::expect_output(str(locations[[1]][[1]]), "SpatialPolygonsDataFrame", fixed = TRUE)

})

Try the ConR package in your browser

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

ConR documentation built on July 2, 2020, 2:33 a.m.