jargonsdev / jargonsdev/jargons.dev
Phase 3: API Endpoint Tests - Authentication & Dictionary APIs
@babblebey is already working on this.
Since Oct 19, 2025.
- Dominant language
- MDX
- Stars
- 56
- Forks
- 45
- PR merge metrics
- No merged PRs in 30d
Description
**Part of:** #170
**Depends on:** #171
## 📋 Phase 3: API Endpoint Tests (High Priority)
### Scope
This phase focuses on testing all API endpoints - the external interface and user-facing functionality.
### 4. **API Routes** (`src/pages/api/`)
**Why critical**: External interface, user-facing functionality.
#### `api/dictionary.js` - Main Dictionary API
**POST endpoint (word submission)**
- [ ] Authentication validation
- [ ] Input sanitization
- [ ] Word creation flow
- [ ] Word editing flow
- [ ] Error responses
**DELETE endpoint (branch cleanup)**
- [ ] Authentication validation
- [ ] Branch deletion
- [ ] Error handling
#### `api/github/oauth/` - Authentication
- [ ] OAuth authorization flow
- [ ] Callback handling
- [ ] Token validation
- [ ] Error scenarios
#### `api/v1/browse/` - Browse Functionality
- [ ] Dictionary browsing endpoints
- [ ] Pagination logic
- [ ] Search functionality
- [ ] Error handling
## 🎯 Success Criteria
- 70%+ coverage for API endpoints
- All authentication flows tested
- Input validation thoroughly tested
- Error scenarios properly handled
- Security validation for auth flows
## 📅 Timeline
**Week 3** of testing implementation
## 🛠️ Setup Required
- Set up API testing framework
- Mock external GitHub API calls
- Create test database/fixtures
- Set up authentication mocking
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.
Assessment
This issue has not been assessed yet.