Skip to content

Commit

Permalink
test presence of preamble cell
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrumbiegel committed Jun 18, 2024
1 parent 5932d5e commit 24db3d8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/testsets/integrations/PlotlyJS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ if Sys.iswindows()
else
test_example(joinpath(@__DIR__, "../../examples/integrations/PlotlyJS.qmd")) do json
cells = json["cells"]
preamble_cell = cells[5]
outputs = preamble_cell["outputs"]
@test length(outputs) == 1
data = outputs[1]["data"]
@test keys(data) == Set(["text/html", "text/plain"])
@test startswith(data["text/html"], "<script type=\"text/javascript\">")
@test occursin("require.undef(\"plotly\")", data["text/html"])
for nth in (6, 9)
cell = cells[nth]
outputs = cell["outputs"]
Expand Down

0 comments on commit 24db3d8

Please sign in to comment.