knofler/a_thousand_lamps/integration-test-write
Claude Code and agent skill by knofler/a_thousand_lamps
Trust tier 2
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Write integration tests for API endpoints — test full request-response cycle with database, fixtures, and cleanup. Triggers: integration test, API test, endpoint test, supertest, test API
Install
npx vskill@latest install knofler/a_thousand_lamps/integration-test-writeSKILL.md
The same SKILL.md was published earlier as knofler/myai/integration-test-write.
Integration Test Write
Write integration tests that exercise API endpoints through the full stack.
Tech Stack
Supertest | Jest/Vitest | MongoDB (Docker or in-memory) | factory fixtures
Playbook
1. Set up test database
- Use Docker Compose or
mongodb-memory-serverfor isolation. - Configure
.env.testwith dedicated connection string. - Connect in
beforeAll, disconnect inafterAll.
2. Create test fixtures
- Build factory functions for test data with unique identifiers.
3. Initialize the app for testing
- Import the app without calling
listen(). Pass to Supertest.
4. Test full request-response cycle
5. Verify database state
- Query the database directly to confirm writes.
- Check cascading effects, computed fields, and timestamps.
6. Test auth and error scenarios
- Verify 401 for unauthenticated, 403 for unauthorized requests.
- Test invalid body (400), not found (404), conflict (409).
- Confirm consistent error response format.
7. Clean up after each test
- Ensure tests can run in any order with no shared state.
8. Run and verify
- Run:
npx vitest run tests/integration. - Confirm all endpoints are covered and assertions are meaningful.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingAI/skills/integration-test-write/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/knofler/a_thousand_lamps/integration-test-write)