From: Vladimír Vondruš Date: Sat, 27 Jan 2018 16:40:36 +0000 (+0100) Subject: doxygen: updated docs about unit testing and coverage to include JS. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=210eac118d70b925ac99ec74bcb7fc81edcdb988;p=blog.git doxygen: updated docs about unit testing and coverage to include JS. --- diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index fe691d6c..01dc38b3 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -84,8 +84,8 @@ install Pelican from my local fork instead: Running tests ============= -Each bigger lump of Python code or Jinja2 template markup has tests. There are -no visual tests for the CSS style at the moment. Run tests: +Each bigger lump of Python code, Jinja2 template markup or JS code has tests. +There are no visual tests for the CSS style at the moment. Run tests: .. code:: sh @@ -97,9 +97,11 @@ no visual tests for the CSS style at the moment. Run tests: cd doxygen python -m unittest + node test/test-search.js -Code coverage needs `coverage.py `_. There is -no possibility of getting code coverage for Jinja2 templates, though. +Code coverage needs `coverage.py `_ for +Python and `istanbul `_ for JS. There is no +possibility of getting code coverage for Jinja2 templates, though. .. code:: sh @@ -107,6 +109,10 @@ no possibility of getting code coverage for Jinja2 templates, though. coverage run -m unittest ; coverage html # open htmlcov/index.html in your browser + cd doxygen + node ./path/to/istanbul/lib/cli.js cover test/test-search.js + # open coverage/lcov-report/index.html in your browser + cd pelican-plugins coverage run -m unittest ; coverage html # open htmlcov/index.html in your browser @@ -119,7 +125,7 @@ case of Doxygen, comment-out the line that removes the ``html`` directory in The project is built on Travis CI on Linux with Python 3.4, 3.5 and 3.6; Doxygen theme is tested only on 3.6 and math rendering is disabled as it's impossible to get it working on the old Ubuntu 14.04 LTS. Build status is over -at https://travis-ci.org/mosra/m.css. +at http://mcss.mosra.cz/build-status/. Contact =======