example-test-files

api-test-suite-builder reference

Content Preview
# api-test-suite-builder reference

## Example Test Files

### Example 1 — Node.js: Vitest + Supertest (Next.js API Route)

```typescript
// tests/api/users.test.ts
import { describe, it, expect, beforeAll, afterAll } from 'vitest'
import request from 'supertest'
import { createServer } from '@/test/helpers/server'
import { generateJWT, generateExpiredJWT } from '@/test/helpers/auth'
import { createTestUser, cleanupTestUsers } from '@/test/helpers/db'

const app = createServer()

describe('GET /
How to Use

Recommended: Install to project (local)

mkdir -p .claude/skills
curl -o .claude/skills/example-test-files.md \
  https://raw.githubusercontent.com/alirezarezvani/claude-skills/main/engineering/api-test-suite-builder/references/example-test-files.md

Skill is scoped to this project only. Add .claude/skills/ to your .gitignoreif you don't want to commit it.

Alternative: Clone full repo

git clone https://github.com/alirezarezvani/claude-skills

Then reference at engineering/api-test-suite-builder/references/example-test-files.md

Related Skills