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 node_modules
*.rserve.R
*.schema.ts *.schema.ts

View File

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

View File

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