Skip to content

Commit e15f6f8

Browse files
committed
fix: review updates
1 parent 8668ff5 commit e15f6f8

4 files changed

Lines changed: 8 additions & 6 deletions

File tree

src/__tests__/docs.json.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ describe('docs.json', () => {
8888

8989
describe('docs.json data integrity', () => {
9090
const allEntries = Object.values(docsJson.docs).flat();
91-
const uniqueCategories = [...new Set(allEntries.map(entry => entry.category).filter(Boolean))];
92-
const uniqueSections = [...new Set(allEntries.map(entry => (entry as any).section).filter(Boolean))];
91+
const uniqueCategories = [...new Set(allEntries.map(entry => entry.category))];
92+
const uniqueSections = [...new Set(allEntries.map(entry => entry.section))];
9393

9494
const checkSimilarity = (list: string[], type: string) => {
9595
for (let i = 0; i < list.length; i++) {
@@ -113,10 +113,10 @@ describe('docs.json data integrity', () => {
113113
};
114114

115115
it('should have categories that are unique and distinct', () => {
116-
expect(() => checkSimilarity(uniqueCategories as string[], 'category')).not.toThrow();
116+
expect(() => checkSimilarity(uniqueCategories, 'category')).not.toThrow();
117117
});
118118

119119
it('should have sections that are unique and distinct', () => {
120-
expect(() => checkSimilarity(uniqueSections as string[], 'section')).not.toThrow();
120+
expect(() => checkSimilarity(uniqueSections, 'section')).not.toThrow();
121121
});
122122
});

src/__tests__/server.helpers.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ describe('listAllCombinations', () => {
777777
expect(result.length).toBe(expected.length);
778778

779779
expected.forEach(combo => {
780-
expect(result).toContainEqual(expect.arrayContaining(combo));
780+
expect(result).toContainEqual(combo);
781781
});
782782
});
783783
});

src/server.helpers.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ const isAsync = (obj: unknown) => /^\[object (Async|AsyncFunction)]/.test(Object
205205
/**
206206
* Check if "is a Promise", "Promise like".
207207
*
208+
* @note This is an internal intentional stable classifier, not a general "returns a thenable" check.
209+
*
208210
* @param obj - Object, or otherwise, to check
209211
* @returns `true` if the object is a Promise
210212
*/

src/server.resourceMeta.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ const setMetadataOptions = ({ name, baseUri, searchParams, metaConfig, config, c
191191
return generateMetaContent({
192192
title: metaTitle,
193193
description: metaDescription,
194-
params: params || [],
194+
params: params,
195195
exampleUris
196196
});
197197
};

0 commit comments

Comments
 (0)