tests/testthat/test-url-file-size.R

library(testthat)
library(campfin)

test_that("the file size of the URL can be checked from HEAD", {
  url <- "https://raw.githubusercontent.com/irworkshop/campfin/master/README.md"
  expect_type(url_file_size(url), "double")
  expect_s3_class(url_file_size(url), "fs_bytes")
})

Try the campfin package in your browser

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

campfin documentation built on Oct. 20, 2023, 5:06 p.m.