
Api Testing
Covers HTTP API testing with Supertest for TypeScript and httpx/pytest for Python. You get practical patterns for REST and GraphQL endpoints, including auth flows, file uploads, request/response validation, and error handling. The examples are solid: shows how to set up fixtures, test protected routes with bearer tokens, validate response timing, and handle common edge cases like 404s and validation errors. The TypeScript side assumes you're using Vitest for your test runner. What's nice is it doesn't overthink things. Just straightforward test patterns you can copy and adapt without wading through theory about testing pyramids or mocking philosophies.
- skills.sh installs
- 910
- GitHub stars
- 248
- last updated
- Aug 21, 2026
Install
$ npx -y skills add secondsky/claude-skills --skill api-testing --agent claude-codeInstalls into .claude/skills of the current project.
Files
API Testing
Expert knowledge for testing HTTP APIs with Supertest (TypeScript/JavaScript) and httpx/pytest (Python).
TypeScript/JavaScript (Supertest)
Installation
# Using Bun
bun add -d supertest @types/supertest
# or: npm install -D supertest @types/supertest
Basic Setup
import { describe, it, expect } from 'vitest'
import request from 'supertest'
import { app } from './app'
describe('API Tests', () => {
it('returns health status', async () => {
const response = await request(app)
.get('/api/health')
.expect(200)
expect(response.body).toEqual({ status: 'ok' })
})
it('creates a user', async () => {
const response = await request(app)
.post('/api/users')
.send({ name: 'John Doe', email: 'john@example.com' })
.expect(201)
expect(response.body).toMatchObject({
id: expect.any(Number),
name: 'John Doe',
})
})
it('validates required fields', async () => {
await request(app)
.post('/api/users')
.send({ name: 'John Doe' })
.expect(400)
})
})
Request Methods
// GET
await request(app).get('/api/users').expect(200)
Sponsors
Details
- Repository
- github.com/secondsky/claude-skills
- Categories
- Backend & APIs, Testing & QA, Security, Debugging, Python
- First seen
- Jun 3, 2026
More from secondsky/claude-skills
All 146- Responsive Web Design703
- Zod663
- Nano Banana Prompts626
- Image Optimization604
- Rest Api Design600
- Mobile First Design598
- Web Performance Optimization576
- Inspira Ui572
- Api Authentication549
- Code Review548
- Web Performance Audit542
- Vulnerability Scanning534
- Kpi Dashboard Design526
- Progressive Web App523
- Tanstack Table513
- Architecture Patterns508
- Api Rate Limiting507
- Api Security Hardening506
- Better Auth502
- Design System Creation500
- React Composition Patterns494
- Api Contract Testing491
- React Native Skills490
- Technical Specification489