You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Remove unnecessary double negation.
- Add an escape character to `categoryDirPattern`
- Handle invalid entry slugs and add tests for invalid `getIndexPageID`
cases
describe("getIndexPageID with invalid entries",()=>{
89
+
interfacetestCase{
90
+
description: string;
91
+
category: NavigationCategory;
92
+
errorSubstring: string;
93
+
}
94
+
95
+
consttestCases: Array<testCase>=[
96
+
{
97
+
description: "non-generated with malformed slugs",
98
+
category: {
99
+
icon: "connect",
100
+
title: "User Guides",
101
+
entries: [
102
+
{
103
+
title: "Introduction",
104
+
slug: "",
105
+
},
106
+
{
107
+
title: "Using tsh",
108
+
slug: "/docs/connect-your-client/tsh/",
109
+
},
110
+
],
111
+
},
112
+
errorSubstring: `malformed slug in docs sidebar configuration: ""`,
113
+
},
114
+
{
115
+
description: "slugs with different top-level segments",
116
+
category: {
117
+
icon: "connect",
118
+
title: "User Guides",
119
+
entries: [
120
+
{
121
+
title: "Introduction",
122
+
slug: "/ver/12.x/enroll-resources/introduction/",
123
+
},
124
+
{
125
+
title: "Using tsh",
126
+
slug: "/ver/12.x/connect-your-client/tsh/",
127
+
},
128
+
],
129
+
},
130
+
errorSubstring: `cannot determine a category index page ID for top-level category User Guides because not all of its entries are in the same first-level directory`,
`cannot determine a category index page ID for top-level category ${category.title} because not all of its entries are in the same first-level directory`
0 commit comments