diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-06-13 23:24:14 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-06-13 23:24:21 +0900 |
commit | 34126021d9cdff90acd73131e9d7d7132c7f1eaa (patch) | |
tree | c28998e209bc4747eb0551c760ee4135af5297ae /tests/test_ext_math.py | |
parent | 2855721d0b6584906f7f2a8b79d9fbec03be912d (diff) | |
download | sphinx-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.py | 12 |
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() |