tests/testthat/test-built-files.R

test_that("shiny.js version was replaced", {
  jsFiles <- system.file(
    file.path("www", "shared", c("shiny.js", "shiny.min.js")),
    package = "shiny"
  )

  lapply(jsFiles, function(jsFile) {
    jsFileContent <- paste(suppressWarnings(readLines(jsFile)), collapse = "\n")
    expect_false(grepl("\\{\\{\\sVERSION\\s\\}\\}", jsFileContent))
  })
})

Try the shiny package in your browser

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

shiny documentation built on Nov. 18, 2023, 1:08 a.m.