@@ -83,7 +83,7 @@ describe.skip('category pages', () => {
83
83
let publishedArticlePaths : string [ ] = [ ]
84
84
let availableArticlePaths : string [ ] = [ ]
85
85
let categoryVersions : string [ ] = [ ]
86
- let categoryChildTypes : string [ ] = [ ]
86
+
87
87
let allowTitleToDifferFromFilename : boolean | undefined = false
88
88
let indexTitle : string = ''
89
89
let indexShortTitle : string = ''
@@ -101,23 +101,9 @@ describe.skip('category pages', () => {
101
101
const data = parsed . data as MarkdownFrontmatter
102
102
categoryVersions = getApplicableVersions ( data . versions , indexAbsPath )
103
103
allowTitleToDifferFromFilename = data . allowTitleToDifferFromFilename
104
- categoryChildTypes = [ ]
105
104
const articleLinks = data . children . filter ( ( child ) => {
106
105
const mdPath = getPath ( productDir , indexLink , child )
107
-
108
106
const fileExists = fs . existsSync ( mdPath )
109
-
110
- // We're checking each item in the category's 'children' frontmatter
111
- // to see if the child is an article by tacking on `.md` to it. If
112
- // that file exists it's an article, otherwise it's a map topic. A
113
- // category needs to have all the same type of children so we track
114
- // that here so we can test to make sure all the types are the same.
115
- if ( fileExists ) {
116
- categoryChildTypes . push ( 'article' )
117
- } else {
118
- categoryChildTypes . push ( 'mapTopic' )
119
- }
120
-
121
107
return fileExists && fs . statSync ( mdPath ) . isFile ( )
122
108
} )
123
109
@@ -217,19 +203,6 @@ describe.skip('category pages', () => {
217
203
} )
218
204
} )
219
205
220
- test ( 'categories contain all the same type of children' , ( ) => {
221
- let errorType = ''
222
- expect (
223
- categoryChildTypes . every ( ( categoryChildType ) => {
224
- errorType = categoryChildType
225
- return categoryChildType === categoryChildTypes [ 0 ]
226
- } ) ,
227
- `${ indexRelPath . replace ( 'index.md' , '' ) } contains a mix of ${ errorType } s and ${
228
- categoryChildTypes [ 0 ]
229
- } s, category children must be of the same type`,
230
- ) . toBe ( true )
231
- } )
232
-
233
206
test ( 'slugified title matches parent directory name' , ( ) => {
234
207
if ( allowTitleToDifferFromFilename ) return
235
208
0 commit comments