summaryrefslogtreecommitdiff
path: root/tests/test_ext_math.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-06-13 23:24:14 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2018-06-13 23:24:21 +0900
commit34126021d9cdff90acd73131e9d7d7132c7f1eaa (patch)
treec28998e209bc4747eb0551c760ee4135af5297ae /tests/test_ext_math.py
parent2855721d0b6584906f7f2a8b79d9fbec03be912d (diff)
downloadsphinx-git-34126021d9cdff90acd73131e9d7d7132c7f1eaa.tar.gz
Close #3784: mathjax: Add :confval:`mathjax_options`
Diffstat (limited to 'tests/test_ext_math.py')
-rw-r--r--tests/test_ext_math.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_ext_math.py b/tests/test_ext_math.py
index 47465f07e..99940977b 100644
--- a/tests/test_ext_math.py
+++ b/tests/test_ext_math.py
@@ -90,6 +90,18 @@ def test_imgmath_svg(app, status, warning):
@pytest.mark.sphinx('html', testroot='ext-math',
+ confoverrides={'extensions': ['sphinx.ext.mathjax'],
+ 'mathjax_options': {'integrity': 'sha384-0123456789'}})
+def test_mathjax_options(app, status, warning):
+ app.builder.build_all()
+
+ content = (app.outdir / 'index.html').text()
+ assert ('<script async="async" integrity="sha384-0123456789" type="text/javascript" '
+ 'src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?'
+ 'config=TeX-AMS-MML_HTMLorMML"></script>' in content)
+
+
+@pytest.mark.sphinx('html', testroot='ext-math',
confoverrides={'extensions': ['sphinx.ext.mathjax']})
def test_mathjax_align(app, status, warning):
app.builder.build_all()