Show More
@@ -5,6 +5,7 b'' | |||
|
5 | 5 | |
|
6 | 6 | from .base import ExportersTestsBase |
|
7 | 7 | from ..html import HTMLExporter |
|
8 | from IPython.nbformat import v4 | |
|
8 | 9 | import re |
|
9 | 10 | |
|
10 | 11 | |
@@ -66,3 +67,19 b' class TestHTMLExporter(ExportersTestsBase):' | |||
|
66 | 67 | (output, resources) = HTMLExporter(template_file='basic').from_filename( |
|
67 | 68 | self._get_notebook(nb_name="pngmetadata.ipynb")) |
|
68 | 69 | assert len(output) > 0 |
|
70 | ||
|
71 | def test_javascript_output(self): | |
|
72 | nb = v4.new_notebook( | |
|
73 | cells=[ | |
|
74 | v4.new_code_cell( | |
|
75 | outputs=[v4.new_output( | |
|
76 | output_type='display_data', | |
|
77 | data={ | |
|
78 | 'application/javascript': "javascript_output();" | |
|
79 | } | |
|
80 | )] | |
|
81 | ) | |
|
82 | ] | |
|
83 | ) | |
|
84 | (output, resources) = HTMLExporter(template_file='basic').from_notebook_node(nb) | |
|
85 | self.assertIn('javascript_output', output) |
General Comments 0
You need to be logged in to leave comments.
Login now