https://github.com/cormacrelf/jest-csl/
Hi all,
I’m in the process of writing a big new style, and I made some tooling to make it easier. jest-csl is a way to do Test-Driven Development on CSL and CSL-M, by writing a specification for how your style should behave.
It takes your list of specs, and runs citeproc on all of them, collecting the results in an easy to use display. It can also spit out JSON of the completed test run, based on which you can write your own documentation generator. I hope it’s helpful to any style authors out there! There’s a mostly complete guide on how to use it in the README.
Three pictures, three thousand words:
- A simple test case;
- Some test output on the command line; and
- Some documentation I generated, written as a React app (can’t share the source yet, but some of its components could be reusable for other projects):
Caveats
Does not yet support testing <bibliography> output. If you need that, it won’t be difficult to add, just let me know.