bug(tests): docgen.parse
See original GitHub issueDescription
i have 2 tests failing.
Steps to reproduce
yarn test
note: since i get errors when installing with yarn.lock
i delete it always before yarn run bootstrap
Expected result
no error
Actual result
Summary of all failing tests
FAIL packages/gatsby-transformer-react-docgen/src/__tests__/displayname-handler.js
● DisplayNameHandler › Explicitly set displayName as static class member
No suitable component definition found.
14 | ${source}
15 | `
> 16 | return docgen.parse(code, findAllComponentDefinitions, [handler])[0]
| ^
17 | }
18 |
19 | describe(`DisplayNameHandler`, () => {
at parse (node_modules/react-docgen/dist/parse.js:66:13)
at Object.parse (node_modules/react-docgen/dist/main.js:61:29)
at parse (packages/gatsby-transformer-react-docgen/src/__tests__/displayname-handler.js:16:17)
at Object.<anonymous> (packages/gatsby-transformer-react-docgen/src/__tests__/displayname-handler.js:32:17)
● DisplayNameHandler › Infer displayName from class declaration/expression name
No suitable component definition found.
14 | ${source}
15 | `
> 16 | return docgen.parse(code, findAllComponentDefinitions, [handler])[0]
| ^
17 | }
18 |
19 | describe(`DisplayNameHandler`, () => {
at parse (node_modules/react-docgen/dist/parse.js:66:13)
at Object.parse (node_modules/react-docgen/dist/main.js:61:29)
at parse (packages/gatsby-transformer-react-docgen/src/__tests__/displayname-handler.js:16:17)
at Object.<anonymous> (packages/gatsby-transformer-react-docgen/src/__tests__/displayname-handler.js:67:19)
Environment
Run gatsby info --clipboard
in your project directory and paste the output here:
System:
OS: macOS 10.15.3
CPU: (8) x64 Intel(R) Core(TM) i7-3820QM CPU @ 2.70GHz
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.13.1 - ~/.nvm/versions/node/v12.13.1/bin/node
Yarn: 1.21.0 - /usr/local/bin/yarn
npm: 6.14.5 - ~/.nvm/versions/node/v12.13.1/bin/npm
Languages:
Python: 3.7.6 - /usr/local/opt/python/libexec/bin/python
Browsers:
Chrome: 83.0.4103.61
Safari: 13.0.5
npmGlobalPackages:
gatsby-cli: 2.12.29
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Bugs and bugs around react-docgen · Issue #240 · doczjs/docz
I'm trying to use it with typescript, which is working fine except PropsTable which renders empty. I had similar issue when working with ......
Read more >react-docgen-typescript-dumi-tmp - npm package - Snyk
A simple parser for React properties defined in TypeScript instead of propTypes. It can be used with React Styleguidist. Installation. npm ...
Read more >styleguidist/styleguidist - Gitter
I have a question about testing. I just ran a test on my Styleguidist clone repo and it failed. I tested before any...
Read more >Automating React Documentation using React ... - Ryosuke
I tested out two ways to use react-docgen to document React code. ... that grabs all the components and uses react-docgen API to...
Read more >Conflict between gi-docgen and g-ir-doc-tool (#7685) - GitLab
Procedure.add_menu_path.page:34: parser error : Opening and ending tag mismatch: Image line 34 and p syntax `<Prefix>/Path/To/Submenu`, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@vladar
i created an PR:
fix(plugin): update react-docgen, fix tests
Fixed via #24788