✨ Feature Description
Set up a minimal yet scalable testing infrastructure for the project using Jest and React Testing Library to enable automated testing for the Next.js App Router codebase.
This includes configuring the testing environment, adding required scripts and dependencies, and introducing a few foundational tests to validate the setup.
🤔 Problem It Solves
Currently, the project does not have any automated testing setup even though the CONTRIBUTING.md mentions that tests are planned for the future.
As a result:
- Every PR must be manually tested
- Contributors cannot confidently verify changes
- Regressions are harder to catch
- CI integration for future contributions becomes difficult
A proper testing foundation will improve development reliability, contributor experience, and long-term maintainability.
💡 Proposed Solution
Implement a lightweight and maintainable testing setup using:
Testing Stack
- Jest
@testing-library/react
@testing-library/jest-dom
jest-environment-jsdom
Configuration
- Add
jest.config.ts
- Add
jest.setup.ts
- Configure Jest for Next.js App Router compatibility
- Add
"test": "jest" script in package.json
Initial Test Coverage
Add a few basic tests to validate the infrastructure:
Unit Tests
-
lib/platforms.ts
- Verify platform URL pattern detection
- Test supported platform mappings
-
lib/url.ts
- Validate URL utility/helper functions
- Test edge cases and invalid inputs
Component Smoke Test
app/components/Navbar.tsx
- Ensure component renders without crashing
- Verify basic visible UI elements
This setup will provide a clean starting point for future contributors to add more tests incrementally.
🔄 Alternatives Considered
1. Vitest Instead of Jest
Vitest offers faster execution and modern tooling, but Jest currently has:
- Better ecosystem maturity
- Wider community adoption
- More existing examples for Next.js projects
2. Cypress/Playwright Only
End-to-end testing alone would not cover unit-level logic efficiently and would introduce heavier setup complexity for an initial testing foundation.
3. No Testing Setup
Continuing without tests would increase maintenance overhead and risk of regressions as the project grows.
🗂️ Files Likely Involved
📸 Mockup / Reference
Reference implementations:
- Next.js + Jest official documentation
- React Testing Library examples
- Existing community setups for Next.js App Router testing
🎯 Acceptance Criteria
🏷️ Difficulty & Labels
Hi, @vishnukothakapu
I am a GSSoC'26 contributor and would like to work on this issue, please assign to me
✨ Feature Description
Set up a minimal yet scalable testing infrastructure for the project using Jest and React Testing Library to enable automated testing for the Next.js App Router codebase.
This includes configuring the testing environment, adding required scripts and dependencies, and introducing a few foundational tests to validate the setup.
🤔 Problem It Solves
Currently, the project does not have any automated testing setup even though the
CONTRIBUTING.mdmentions that tests are planned for the future.As a result:
A proper testing foundation will improve development reliability, contributor experience, and long-term maintainability.
💡 Proposed Solution
Implement a lightweight and maintainable testing setup using:
Testing Stack
@testing-library/react@testing-library/jest-domjest-environment-jsdomConfiguration
jest.config.tsjest.setup.ts"test": "jest"script inpackage.jsonInitial Test Coverage
Add a few basic tests to validate the infrastructure:
Unit Tests
lib/platforms.tslib/url.tsComponent Smoke Test
app/components/Navbar.tsxThis setup will provide a clean starting point for future contributors to add more tests incrementally.
🔄 Alternatives Considered
1. Vitest Instead of Jest
Vitest offers faster execution and modern tooling, but Jest currently has:
2. Cypress/Playwright Only
End-to-end testing alone would not cover unit-level logic efficiently and would introduce heavier setup complexity for an initial testing foundation.
3. No Testing Setup
Continuing without tests would increase maintenance overhead and risk of regressions as the project grows.
🗂️ Files Likely Involved
jest.config.ts— Jest configurationjest.setup.ts— global test setuppackage.json— add scripts and dependencies__tests__/lib/platforms.test.ts— platform detection tests__tests__/lib/url.test.ts— URL utility tests__tests__/components/Navbar.test.tsx— Navbar smoke test📸 Mockup / Reference
Reference implementations:
🎯 Acceptance Criteria
npm testorpnpm testexecutes without errorslib/platforms.tsare added and passinglib/url.tsare added and passing🏷️ Difficulty & Labels
good first issue— beginner friendlymedium— requires some codebase knowledgehard— significant changes neededlevel3— advancedHi, @vishnukothakapu
I am a GSSoC'26 contributor and would like to work on this issue, please assign to me