Skip to content

Commit

Permalink
add test for mermaid mime
Browse files Browse the repository at this point in the history
  • Loading branch information
bollwyvl committed Aug 23, 2023
1 parent 1e176bb commit 3032063
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions nbconvert/exporters/tests/test_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,22 @@ def test_javascript_output(self):
(output, resources) = HTMLExporter(template_name="classic").from_notebook_node(nb)
self.assertIn("javascript_output", output)

def test_mermaid_output(self):
nb = v4.new_notebook(
cells=[
v4.new_code_cell(
outputs=[
v4.new_output(
output_type="display_data",
data={"text/vnd.mermaid": "flowchart LR\na --> b"},
)
]
)
]
)
(output, resources) = HTMLExporter(template_name="lab").from_notebook_node(nb)
self.assertIn("""<div class="jp-Mermaid"><pre class="mermaid">""", output)

def test_attachments(self):
(output, resources) = HTMLExporter(template_name="classic").from_file(
self._get_notebook(nb_name="attachment.ipynb")
Expand Down

0 comments on commit 3032063

Please sign in to comment.