tests/testthat/test-git-app.R

test_that("git_app", {
  skip_on_cran()
  dir.create(tmp <- tempfile())
  on.exit(unlink(tmp, recursive = TRUE), add = TRUE)
  untar(testthat::test_path("fixtures/git-repo.tar.gz"), exdir = tmp)
  app <- git_app(file.path(tmp, "repo"))
  git <- webfakes::local_app_process(app)

  expect_snapshot(
    system(
      paste("git ls-remote", git$url("/pak-test.git")),
      intern = TRUE
    )
  )
})

Try the webfakes package in your browser

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

webfakes documentation built on May 29, 2024, 2:24 a.m.