karma-nunjucks
Nunjucks for Karma
Uses html2js preprocessor ("karma-html2js-preprocessor") or an ordinary template string to compile nunjucks templates using any version of nunjucks.
Basic Example
Nunjucks is now available to your tests.
;
Example with templates
A new convenience method is available in nunjucks environments to make templates available
called getPreprocessedTemplate
.
;
Example with mocked filters
Sometimes it's useful to mock filters that access the disk or other resources. Use mockFilter
.
;