json-schema-org / json-schema-org/website
✨ Enhancement: Implement missing component tests and improve overall coverage
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 169
- Forks
- 484
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 6
Description
Is your feature request related to a problem? Please describe
While exploring the codebase to understand the current architecture, I performed a manual audit of the testing suite. I noticed a significant gap in our test coverage for several foundational and UI-specific components. Currently, components like CarbonsAds.tsx, SiteLayout.tsx, and several shared UI elements in components/ui/ (such as input.tsx and textarea.tsx) have no associated test files. This makes the repository vulnerable to regressions as the website scales or dependencies are updated.
Describe the solution you'd like
I’d like to help bridge this gap by systematically adding component and unit tests for the missing areas. My plan is to:
-
Strengthen the UI Foundation: Start by adding tests for the shared components in components/ui/ (like input.tsx and textarea.tsx) to ensure they render and handle events correctly.
-
Protect Core Logic: Implement tests for more complex components like TabsGroup.tsx and TableOfContentMarkdown.tsx that drive the documentation experience.
-
Improve Maintainability: Ensure every new test is documented so other contributors can easily follow the pattern.
Describe alternatives you've considered
I initially considered diving right into adding new features, but I believe that establishing a strong and reliable testing foundation is more beneficial for the project's long-term health at this stage. I also thought about submitting one large pull request (PR) for all the tests; however, I would prefer to create smaller, focused PRs. This approach will make it easier for the maintainers to review and provide feedback.
Additional context
I’ve already identified the components that require the most attention, including GettingStarted.tsx and StyledMarkdown.tsx. I’m already hanging out in the #contribute Slack channel and am looking forward to helping make the JSON Schema website more robust for everyone.
Are you working on this?
Yes
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the named components—CarbonsAds.tsx, SiteLayout.tsx, input.tsx, textarea.tsx, TabsGroup.tsx, TableOfContentMarkdown.tsx, GettingStarted.tsx, and StyledMarkdown.tsx—to understand their rendered behavior and event handling. Add focused component tests for the missing areas and ensure each component's key behavior is covered and documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100