-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for undocumented declaration (// comment)
- Loading branch information
Showing
4 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
packages/docgen/tests/fixtures/default-undocumented-oneliner.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// This comment should be ignored | ||
export default function() { } |
45 changes: 45 additions & 0 deletions
45
packages/docgen/tests/fixtures/default-undocumented-oneliner.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"type": "ExportDefaultDeclaration", | ||
"start": 34, | ||
"end": 63, | ||
"range": [ | ||
34, | ||
63 | ||
], | ||
"declaration": { | ||
"type": "FunctionDeclaration", | ||
"start": 49, | ||
"end": 63, | ||
"range": [ | ||
49, | ||
63 | ||
], | ||
"id": null, | ||
"generator": false, | ||
"expression": false, | ||
"async": false, | ||
"params": [], | ||
"body": { | ||
"type": "BlockStatement", | ||
"start": 60, | ||
"end": 63, | ||
"range": [ | ||
60, | ||
63 | ||
], | ||
"body": [] | ||
} | ||
}, | ||
"leadingComments": [ | ||
{ | ||
"type": "Line", | ||
"value": " This comment should be ignored", | ||
"start": 0, | ||
"end": 33, | ||
"range": [ | ||
0, | ||
33 | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters