react-docgen-typescript
Advanced tools
Comparing version
@@ -728,3 +728,12 @@ "use strict"; | ||
}); | ||
describe('issues tests', function () { | ||
it('188', function () { | ||
testUtils_1.check('Issue188', { | ||
Header: { | ||
content: { type: 'string', required: true, description: '' }, | ||
}, | ||
}, true, ''); | ||
}); | ||
}); | ||
}); | ||
//# sourceMappingURL=parser.js.map |
@@ -19,3 +19,3 @@ import { ComponentDoc, ParserOptions } from '../parser'; | ||
export declare function fixturePath(componentName: string): string; | ||
export declare function check(componentName: string, expected: ExpectedComponents, exactProperties?: boolean, description?: string, parserOpts?: ParserOptions): void; | ||
export declare function checkComponent(actual: ComponentDoc[], expected: ExpectedComponents, exactProperties?: boolean, description?: string): void; | ||
export declare function check(componentName: string, expected: ExpectedComponents, exactProperties?: boolean, description?: string | null, parserOpts?: ParserOptions): void; | ||
export declare function checkComponent(actual: ComponentDoc[], expected: ExpectedComponents, exactProperties?: boolean, description?: string | null): void; |
@@ -34,6 +34,9 @@ "use strict"; | ||
var compName = componentDoc.displayName; | ||
var expectedComponentDescription = description || compName + " description"; | ||
var expectedComponentDescription = compName + " description"; | ||
if (description !== undefined) { | ||
expectedComponentDescription = description || ''; | ||
} | ||
if (componentDoc.description !== expectedComponentDescription) { | ||
// tslint:disable-next-line:max-line-length | ||
errors.push(compName + " description is different - expected: '" + compName + " description', actual: '" + componentDoc.description + "'"); | ||
errors.push(compName + " description is different - expected: '" + expectedComponentDescription + "', actual: '" + componentDoc.description + "'"); | ||
} | ||
@@ -40,0 +43,0 @@ if (propNames.length !== expectedPropNames.length && |
{ | ||
"name": "react-docgen-typescript", | ||
"version": "1.12.4", | ||
"version": "1.12.5", | ||
"description": "", | ||
"homepage": "https://github.com/styleguidist/react-docgen-typescript/", | ||
"bugs": "https://github.com/styleguidist/react-docgen-typescript/issues", | ||
"main": "lib/index.js", | ||
@@ -44,3 +46,7 @@ "types": "lib/index.d.ts", | ||
"README.md" | ||
] | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/styleguidist/react-docgen-typescript.git" | ||
} | ||
} |
@@ -104,3 +104,3 @@ # react-docgen-typescript | ||
 | ||
 | ||
@@ -139,3 +139,3 @@ The functional component [`Grid.tsx`](./examples/react-styleguidist-example/components/Grid.tsx) | ||
 | ||
 | ||
@@ -142,0 +142,0 @@ ## Contributions |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
141795
0.81%1876
0.64%0
-100%2
-33.33%