Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit0 committed May 6, 2024
1 parent 7321837 commit e059cc8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/lib/converter/converter.ts
Expand Up @@ -586,6 +586,11 @@ export class Converter extends ChildableComponent<
jsDocCompatibility:
this.application.options.getValue("jsDocCompatibility"),
};

// Can't be included in options because the TSDoc parser blows up if we do.
// TypeDoc supports it as one, so it should always be included here.
this._config.blockTags.add("@inheritDoc");

return this._config;
}
}
Expand Down
1 change: 1 addition & 0 deletions src/lib/utils/options/tsdoc-defaults.ts
Expand Up @@ -17,6 +17,7 @@ export const blockTags = [
...tsdocBlockTags,
"@category",
"@categoryDescription",
"@default",
"@document",
"@group",
"@groupDescription",
Expand Down
2 changes: 1 addition & 1 deletion src/test/comments.test.ts
Expand Up @@ -1070,7 +1070,7 @@ describe("Raw Lexer", () => {

describe("Comment Parser", () => {
const config: CommentParserConfig = {
blockTags: new Set(["@param", "@remarks", "@module"]),
blockTags: new Set(["@param", "@remarks", "@module", "@inheritDoc"]),
inlineTags: new Set(["@link"]),
modifierTags: new Set([
"@public",
Expand Down
2 changes: 2 additions & 0 deletions src/test/issues.c2.test.ts
Expand Up @@ -445,6 +445,8 @@ describe("Issue Tests", () => {
]),
];
equal(alias.comment, expectedComment);

logger.expectMessage("warn: Encountered an unknown block tag @asdf.");
});

it("#1745", () => {
Expand Down
4 changes: 4 additions & 0 deletions tsdoc.json
Expand Up @@ -63,6 +63,10 @@
"tagName": "@document",
"syntaxKind": "block"
},
{
"tagName": "@default",
"syntaxKind": "block"
},
{
// TSDoc defines @returns, we also recognize @return for JSDoc compat
"tagName": "@return",
Expand Down

0 comments on commit e059cc8

Please sign in to comment.