organise demo app

This commit is contained in:
Tom Elliott 2025-01-21 20:57:30 +13:00
parent 2866bed187
commit 38c13b10f6
4 changed files with 6 additions and 4 deletions

View File

@ -1,2 +1,3 @@
node_modules
*.rserve.R
*.schema.ts

View File

@ -41,6 +41,6 @@ test_that("anonomous functions", {
test_that("Compile files", {
f <- tempfile(fileext = ".rserve.ts")
on.exit(unlink(f))
res <- ts_compile("app.R", file = f)
res <- ts_compile("sampler/app.R", file = f)
expect_true(file.exists(f))
})

View File

@ -1,5 +1,6 @@
test_that("Deploy converts ts functions into valid ocap lists", {
on.exit(if (file.exists("app.rserve.R")) unlink("app.rserve.R"))
ts_deploy("app.R")
expect_true(file.exists("app.rserve.R"))
f <- tempfile(fileext = ".rserve.R")
on.exit(unlink(f))
ts_deploy("sampler/app.R", file = f)
expect_true(file.exists(f))
})