@@ -19,31 +19,17 @@ describe('generateJSDocComment', () => {
1919 ` ) ;
2020 } ) ;
2121
22- it ( 'should generate JSDoc comment for different type name' , ( ) => {
23- const result = generateJSDocComment (
24- 'ConfigOptions' ,
25- 'https://docs.site.com' ,
26- ) ;
27- expect ( result ) . toBe (
28- `*
29- * Type Definition: \`ConfigOptions\`
30- *
31- * This type is derived from a Zod schema and represents
32- * the validated structure of \`ConfigOptions\` used within the application.
33- *
34- * @see {@link https://docs.site.com#configoptions}
35- ` ,
36- ) ;
37- } ) ;
38-
3922 it ( 'should convert type name to lowercase in the link anchor' , ( ) => {
40- const result = generateJSDocComment ( 'MyComplexType ' , 'https://example.com' ) ;
23+ const result = generateJSDocComment ( 'Schema ' , 'https://example.com' ) ;
4124 expect ( result ) . toContain ( 'https://example.com#' ) ;
4225 } ) ;
4326
44- it ( 'should handle type names with numbers' , ( ) => {
45- const result = generateJSDocComment ( 'Schema123' , 'https://example.com/api' ) ;
46- expect ( result ) . toContain ( 'Type Definition: `Schema123`' ) ;
47- expect ( result ) . toContain ( '#schema123' ) ;
27+ it ( 'should use type name in description' , ( ) => {
28+ const result = generateJSDocComment ( 'Schema' , 'https://example.com' ) ;
29+ expect ( result ) . toContain ( 'Type Definition: `SchemaName123`' ) ;
30+ } ) ;
31+ it ( 'should convert type name to lowercase in the link anchor' , ( ) => {
32+ const result = generateJSDocComment ( 'SchemaName123' , 'https://example.com' ) ;
33+ expect ( result ) . toContain ( '#schemaname123' ) ;
4834 } ) ;
4935} ) ;
0 commit comments