Skip to content

Conversation

hipstersmoothie
Copy link
Contributor

@hipstersmoothie hipstersmoothie commented Apr 25, 2020

closes #176

I had to change the following test cases

https://github.com/styleguidist/react-docgen-typescript/pull/253/files#diff-c4e2044ddda57c0b9b40f972fc77d27eR629
https://github.com/styleguidist/react-docgen-typescript/pull/253/files#diff-c4e2044ddda57c0b9b40f972fc77d27eR643

They were using the name of the file for the name of the component that was already a named export. Since they are named exports and aren't exported as default I think It makes more sense the way it is now.

We could count how many exports that are, but I think the code in the PR makes more sense


it('should parse functional component component defined as const as named export', () => {
check(
'FunctionalComponentAsConstAsNamedExport',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe it would make sense to rename this test and file it use as it doesn't use the file name anymore.


it('should parse React.SFC component defined as const as named export', () => {
check(
'ReactSFCAsConstAsNamedExport',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the same here

@pvasek pvasek merged commit ba4c27f into styleguidist:master May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrectly parse props with several named exports and consts
2 participants