1
0
mirror of synced 2025-12-23 21:07:12 -05:00

Merge branch 'main' of github.com:github/docs-internal into hidden-docs-alt

This commit is contained in:
Sarah Schneider
2020-12-03 10:29:46 -05:00
13 changed files with 42 additions and 9 deletions

View File

@@ -389,7 +389,7 @@ describe('catches errors thrown in Page class', () => {
expect(getPage).toThrowError('versions')
})
test('page with a version in frontmatter that its parent product is not available in', () => {
test('English page with a version in frontmatter that its parent product is not available in', () => {
function getPage () {
return new Page({
relativePath: 'admin/some-category/some-article-with-mismatched-versions-frontmatter.md',
@@ -400,4 +400,16 @@ describe('catches errors thrown in Page class', () => {
expect(getPage).toThrowError(/`versions` frontmatter.*? product is not available in/)
})
test('non-English page with a version in frontmatter that its parent product is not available in', () => {
function getPage () {
return new Page({
relativePath: 'admin/some-category/some-article-with-mismatched-versions-frontmatter.md',
basePath: path.join(__dirname, '../fixtures/products'),
languageCode: 'es'
})
}
expect(getPage).toThrowError(/`versions` frontmatter.*? product is not available in/)
})
})