@redhat-ai-dev/backstage-template-test
v1.0.1
Published
A simple test library to validate nunjucks templates used in Backstage software templates
Maintainers
Readme
backstage-template-test
A simple test library to validate nunjucks templates used in Backstage software templates
This repository contains a basic testing library for the Nunjucks templates used in Backstage software templates. This library is written using the ts-jest and Nunjucks libraries.
Prerequisites
- Node.js v18 or later
- yarn
Running the sample tests
yarn installyarn test
Using the testing library
Run
yarn add -D backstage-template-testto pull in the testing library to your projectDescribe test case and inputs, based on the format used by jest:
- Add any necessary test data under the test folder as needed - if validating multiple files at once, ensure the test data file names match the templated file names
