Skip to content

Commit e059cc8

Browse files
committed
Fix tests
1 parent 7321837 commit e059cc8

File tree

5 files changed

+13
-1
lines changed

5 files changed

+13
-1
lines changed

src/lib/converter/converter.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,11 @@ export class Converter extends ChildableComponent<
586586
jsDocCompatibility:
587587
this.application.options.getValue("jsDocCompatibility"),
588588
};
589+
590+
// Can't be included in options because the TSDoc parser blows up if we do.
591+
// TypeDoc supports it as one, so it should always be included here.
592+
this._config.blockTags.add("@inheritDoc");
593+
589594
return this._config;
590595
}
591596
}

src/lib/utils/options/tsdoc-defaults.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export const blockTags = [
1717
...tsdocBlockTags,
1818
"@category",
1919
"@categoryDescription",
20+
"@default",
2021
"@document",
2122
"@group",
2223
"@groupDescription",

src/test/comments.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,7 @@ describe("Raw Lexer", () => {
10701070

10711071
describe("Comment Parser", () => {
10721072
const config: CommentParserConfig = {
1073-
blockTags: new Set(["@param", "@remarks", "@module"]),
1073+
blockTags: new Set(["@param", "@remarks", "@module", "@inheritDoc"]),
10741074
inlineTags: new Set(["@link"]),
10751075
modifierTags: new Set([
10761076
"@public",

src/test/issues.c2.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,8 @@ describe("Issue Tests", () => {
445445
]),
446446
];
447447
equal(alias.comment, expectedComment);
448+
449+
logger.expectMessage("warn: Encountered an unknown block tag @asdf.");
448450
});
449451

450452
it("#1745", () => {

tsdoc.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@
6363
"tagName": "@document",
6464
"syntaxKind": "block"
6565
},
66+
{
67+
"tagName": "@default",
68+
"syntaxKind": "block"
69+
},
6670
{
6771
// TSDoc defines @returns, we also recognize @return for JSDoc compat
6872
"tagName": "@return",

0 commit comments

Comments
 (0)