Skip to content

Commit

Permalink
ci(category): add property IDs to category in specs - test should fail
Browse files Browse the repository at this point in the history
  • Loading branch information
brunozoric authored and Gerrit0 committed Jan 16, 2021
1 parent 18d83f6 commit ad6b18f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
11 changes: 8 additions & 3 deletions src/lib/converter/plugins/CategoryPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@ export class CategoryPlugin extends ConverterComponent {
commentTags.push(tag);
return;
}
categories.push(tag.text.trim());
const text = tag.text.trim();
if (!text) {
return;
}
categories.push(text);
});
comment.tags = commentTags;
return categories;
Expand All @@ -204,8 +208,9 @@ export class CategoryPlugin extends ConverterComponent {
if (!signature.comment) {
return categories;
}
categories.push(...extractCategoryTag(signature.comment));
return categories;
return categories.concat(
extractCategoryTag(signature.comment)
);
},
[]
);
Expand Down
1 change: 1 addition & 0 deletions src/test/converter/class/class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export class TestClass {

/**
* publicMethod short text.
* @category AnotherTest
* @category Test
*/
public publicMethod() {}
Expand Down
3 changes: 2 additions & 1 deletion src/test/converter/class/specs-with-lump-categories.json
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,8 @@
"title": "AnotherTest",
"children": [
32,
30
30,
28
]
},
{
Expand Down
3 changes: 2 additions & 1 deletion src/test/converter/class/specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,8 @@
"title": "AnotherTest",
"children": [
32,
30
30,
28
]
},
{
Expand Down

0 comments on commit ad6b18f

Please sign in to comment.