Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test for PlutoPages.develop #8

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
using PlutoPages
using Test

@testset "PlutoPages.jl" begin
cache_dir = mktempdir()

@testset "generate" begin

input_dir = PlutoPages.create_test_basic_site()

Expand All @@ -10,6 +12,8 @@ using Test
result = PlutoPages.generate(; dirs...)
@test result == dirs.output_dir

global cache_dir = dirs.cache_dir

@info "Done!" dirs readdir(dirs.input_dir) readdir(dirs.output_dir)

@test isdir(dirs.output_dir)
Expand All @@ -24,3 +28,26 @@ using Test


end

@testset "develop" begin

input_dir = PlutoPages.create_test_basic_site()

dirs = PlutoPages.create_subdirs(input_dir)

t = @async PlutoPages.develop(; dirs..., cache_dir=cache_dir)

sleep(10)

Base.throwto(t, InterruptException())
Base.throwto(t, InterruptException())
Base.throwto(t, InterruptException())

try
wait(t)
catch e
if !isa(e, InterruptException)
rethrow(e)
end
end
end
Loading