diff --git a/tests/content/lint-files.js b/tests/content/lint-files.js index 68d29c4ed1..757e4b2c46 100644 --- a/tests/content/lint-files.js +++ b/tests/content/lint-files.js @@ -11,6 +11,7 @@ const frontmatter = require('../../lib/frontmatter') const languages = require('../../lib/languages') const { tags } = require('../../lib/liquid-tags/extended-markdown') const ghesReleaseNotesSchema = require('../../lib/release-notes-schema') +const renderContent = require('../../lib/render-content') const rootDir = path.join(__dirname, '../..') const contentDir = path.join(rootDir, 'content') @@ -296,6 +297,15 @@ describe('lint-files', () => { } }) }) + + test('contains valid Liquid', async () => { + // If Liquid can't parse the file, it'll throw an error. + // For example, the following is invalid and will fail this test: + // {% if currentVersion ! "github-ae@latest" %} + await expect(renderContent.liquid.parse(content)) + .resolves + .toBeTruthy() + }) } )