Skip to content

Commit bf23391

Browse files
authored
repo sync
2 parents 0c87e43 + 40d604d commit bf23391

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

tests/content/lint-files.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const frontmatter = require('../../lib/frontmatter')
1111
const languages = require('../../lib/languages')
1212
const { tags } = require('../../lib/liquid-tags/extended-markdown')
1313
const ghesReleaseNotesSchema = require('../../lib/release-notes-schema')
14+
const renderContent = require('../../lib/render-content')
1415

1516
const rootDir = path.join(__dirname, '../..')
1617
const contentDir = path.join(rootDir, 'content')
@@ -296,6 +297,15 @@ describe('lint-files', () => {
296297
}
297298
})
298299
})
300+
301+
test('contains valid Liquid', async () => {
302+
// If Liquid can't parse the file, it'll throw an error.
303+
// For example, the following is invalid and will fail this test:
304+
// {% if currentVersion ! "github-ae@latest" %}
305+
await expect(renderContent.liquid.parse(content))
306+
.resolves
307+
.toBeTruthy()
308+
})
299309
}
300310
)
301311

0 commit comments

Comments
 (0)