Skip to content

Commit

Permalink
add test to limit maximum number of templates (#340)
Browse files Browse the repository at this point in the history
Co-authored-by: Matt Chapman <[email protected]>
  • Loading branch information
asfordmatt and Matt Chapman authored Jul 19, 2023
1 parent ac2abdd commit 715a129
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/template-files-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ const expect = chai.expect
const jsonata = require('jsonata')
const jsyaml = require('js-yaml')

const MAX_TEMPLATE_COUNT = 350 // Current practical limit for rendering template gallery

const markdownDirectoryName = 'markdown'
const templateMetadataFilename = 'template-metadata.json'
const templateMetadata = require('../resources/' + templateMetadataFilename)
Expand All @@ -27,6 +29,10 @@ describe('Template files', function () {
}
})

it('template count must be within agreed threshold', function () {
expect(templateMetadata.templates.length).lessThanOrEqual(MAX_TEMPLATE_COUNT)
})

it('must not contain account-name in action or trigger interfaces', function () {
let noAccountNameFound = true
for (const template of templateMetadata.templates) {
Expand Down

0 comments on commit 715a129

Please sign in to comment.