Skip to content

Commit

Permalink
fix errors and add test
Browse files Browse the repository at this point in the history
  • Loading branch information
disberd committed May 26, 2024
1 parent d3502aa commit 2820d35
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/html_helpers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ function hide_this_log(content::AbstractString = ""; id = randid())
print(io, this_contents)
end
end
hide_this_log(html::Docs.HTML) = hide_this_log(html.content)
hide_this_log(html::Docs.HTML; kwargs...) = hide_this_log(html.content; kwargs...)
8 changes: 7 additions & 1 deletion test/basics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import Pluto: update_save_run!, update_run!, WorkspaceManager, ClientSession,
ServerSession, Notebook, Cell, project_relative_path, SessionActions,
load_notebook, Configuration
using PlutoDevMacros
using PlutoDevMacros: hide_this_log
using Test

function noerror(cell; verbose=true)
if cell.errored && verbose
Expand Down Expand Up @@ -37,4 +39,8 @@ eval_in_nb(sn, expr) = WorkspaceManager.eval_fetch_in_workspace(sn, expr)
@test noerror(cell)
end
SessionActions.shutdown(ss, nb)
end
end

html_content = "asd"
html = html"asd"
@test hide_this_log(html_content; id = "asd") == hide_this_log(html; id = "asd")

0 comments on commit 2820d35

Please sign in to comment.