test: add tests for overview component#1947
Conversation
|
What reviewer looks at during PR reviewThe following are ideal points maintainers look for during review. Reviewing these points yourself beforehand can help streamline the review process and reduce time to merge.
|
📝 WalkthroughWalkthroughAdds a new test suite for the Overview component and a small AsyncAPI fixture: tests parse an AsyncAPI YAML, derive serverUrl, render Overview with various prop combinations, perform snapshot assertions, and verify error handling when required props are missing. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| import { Overview } from '../../src/components/readme/Overview'; | ||
|
|
||
| const parser = new Parser(); | ||
| const asyncapi_websocket_query = path.resolve(__dirname, '../../../helpers/test/__fixtures__/asyncapi-websocket-query.yml'); |
There was a problem hiding this comment.
yeah some other components incorrectly uses this fixture but this should be actually one inside components https://github.com/asyncapi/generator/blob/master/packages/components/test/__fixtures__/asyncapi-v3.yml
please use this one. you can make changes in fixtures only if testing requires.
|
|
/rtm |
Co-authored-by: Varshitha Besthavemula <varshithabesthavemula@gmail.com> Co-authored-by: Adi Boghawala <adiboghawala@gmail.com>



Adds comprehensive tests for the Overview readme component to verify correct rendering and error behavior.
What’s included :
Fixes #1939
Summary by CodeRabbit