1.0.1 • Published 8 months ago
@redhat-ai-dev/backstage-template-test v1.0.1
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
1) yarn install
2) yarn test
Using the testing library
1) Run yarn add -D backstage-template-test to pull in the testing library to your project
2) Describe test case and inputs, based on the format used by jest:
2) 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
1.0.1
8 months ago