remove redundant test
This commit is contained in:
@@ -410,15 +410,13 @@ describe('lint markdown content', () => {
|
|||||||
isEarlyAccess,
|
isEarlyAccess,
|
||||||
isSitePolicy,
|
isSitePolicy,
|
||||||
hasExperimentalAlternative,
|
hasExperimentalAlternative,
|
||||||
frontmatterErrors,
|
|
||||||
frontmatterData
|
frontmatterData
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
const fileContents = await fs.readFile(markdownAbsPath, 'utf8')
|
const fileContents = await fs.readFile(markdownAbsPath, 'utf8')
|
||||||
const { data, content: bodyContent, errors } = frontmatter(fileContents)
|
const { data, content: bodyContent } = frontmatter(fileContents)
|
||||||
|
|
||||||
content = bodyContent
|
content = bodyContent
|
||||||
frontmatterErrors = errors
|
|
||||||
frontmatterData = data
|
frontmatterData = data
|
||||||
ast = fromMarkdown(content)
|
ast = fromMarkdown(content)
|
||||||
isHidden = data.hidden === true
|
isHidden = data.hidden === true
|
||||||
@@ -611,13 +609,6 @@ describe('lint markdown content', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
if (!markdownRelPath.includes('data/reusables')) {
|
if (!markdownRelPath.includes('data/reusables')) {
|
||||||
test('contains valid frontmatter', () => {
|
|
||||||
const errorMessage = frontmatterErrors
|
|
||||||
.map((error) => `- [${error.property}]: ${error.actual}, ${error.message}`)
|
|
||||||
.join('\n')
|
|
||||||
expect(frontmatterErrors.length, errorMessage).toBe(0)
|
|
||||||
})
|
|
||||||
|
|
||||||
test('frontmatter contains valid liquid', async () => {
|
test('frontmatter contains valid liquid', async () => {
|
||||||
const fmKeysWithLiquid = ['title', 'shortTitle', 'intro', 'product', 'permission'].filter(
|
const fmKeysWithLiquid = ['title', 'shortTitle', 'intro', 'product', 'permission'].filter(
|
||||||
(key) => Boolean(frontmatterData[key])
|
(key) => Boolean(frontmatterData[key])
|
||||||
|
|||||||
Reference in New Issue
Block a user