Skip to content

Commit

Permalink
fix mermaid mime tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bollwyvl committed Aug 23, 2023
1 parent 3032063 commit 12c63d1
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion nbconvert/exporters/tests/test_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,28 @@ def test_mermaid_output(self):
]
)
(output, resources) = HTMLExporter(template_name="lab").from_notebook_node(nb)
self.assertIn("""<div class="jp-Mermaid"><pre class="mermaid">""", output)
self.assertIn("""<div class="jp-Mermaid">""", output)
self.assertIn("""<pre class="mermaid">""", output)


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

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

0 comments on commit 12c63d1

Please sign in to comment.