mozilla / nunjucks

A powerful templating engine with inheritance, asynchronous control, and more (jinja2 inspired)
https://mozilla.github.io/nunjucks/
BSD 2-Clause "Simplified" License
8.48k stars 634 forks source link

Documentation missing for template tests #1450

Open alanpearce opened 9 months ago

alanpearce commented 9 months ago

I thought nunjucks didn't have support for Jinja-style tests until I found the PR that added it (#1033). I wanted to add my own tests Environment.addTest does not appear in https://mozilla.github.io/nunjucks/api.html. They don't appear very clearly on https://mozilla.github.io/nunjucks/templating.html either; only select and reject hint that they exist without listing the built-in tests

Environment.addTest and friends are also missing in https://github.com/DefinitelyTyped/DefinitelyTyped, but I don't know if anyone from here has an eye on the TypeScript types.