MathJax-src icon indicating copy to clipboard operation
MathJax-src copied to clipboard

Jest custom reporter for macro coverage of tex package

Open zorkow opened this issue 1 year ago • 1 comments

Title says it all. A custom reporter that outputs the coverage of how many macros per TeX package are tested. Since we cannot store information globally and pass them to the reporter (Some discussions on this are here: https://github.com/jestjs/jest/issues/7421) I have employed a hack outputting JSON to the FS, currently a file /tmp/test.json. Then we output one table per TeX package, not has nicely coloured as the general coverage table.

This is a mix of .js, .ts.d and .ts files, as I could not get the reporter to run as .ts file, since we do not compile our test sources.

I am sure it could be done better, but I think spending two says on this is sufficient, as all we really want it for is to get to 100% coverage for our macros.

zorkow avatar Jun 20 '24 20:06 zorkow

since we do not compile our test sources.

Actually, they should be compiled into the js directory when you edit them in emacs, and you could do a tsc command in the test suite directory if you wanted to, and if that helps. But not really necessary since you have it working, just if it made things cleaner.

dpvc avatar Jun 23 '24 20:06 dpvc

Changes made. PTAL.

zorkow avatar Jul 11 '24 13:07 zorkow

Took care of the two missing comments and merged.

zorkow avatar Aug 09 '24 10:08 zorkow