skills_all/testing/SKILL.md
Run and troubleshoot tests for DBHub, including unit tests, integration tests with Testcontainers, and database-specific tests. Use when asked to run tests, fix test failures, debug integration tests, or troubleshoot Docker/database container issues.
npx skillsauth add activer007/ordinary-claude-skills testingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill helps you run and troubleshoot tests in the DBHub project.
Before running tests, consult TESTING.md for comprehensive documentation.
Common test commands:
pnpm test - Run all testspnpm test:watch - Run tests in watch modepnpm test:integration - Run integration tests (requires Docker)pnpm test src/connectors/__tests__/{db-type}.integration.test.ts - Test specific database connectorIntegration tests use Testcontainers to run real database instances in Docker.
Before running integration tests, verify:
docker psTest individual database connectors:
# PostgreSQL
pnpm test src/connectors/__tests__/postgres.integration.test.ts
# MySQL
pnpm test src/connectors/__tests__/mysql.integration.test.ts
# MariaDB
pnpm test src/connectors/__tests__/mariadb.integration.test.ts
# SQL Server
pnpm test src/connectors/__tests__/sqlserver.integration.test.ts
# SQLite
pnpm test src/connectors/__tests__/sqlite.integration.test.ts
# JSON RPC integration
pnpm test src/__tests__/json-rpc-integration.test.ts
If containers fail to start:
# Verify Docker is running
docker ps
# Check disk space
docker system df
# Manually pull images
docker pull postgres:15-alpine
docker pull mysql:8.0
docker pull mariadb:10.11
docker pull mcr.microsoft.com/mssql/server:2019-latest
SQL Server containers require 3-5 minutes to start:
pnpm test src/connectors/__tests__/sqlserver.integration.test.ts# Run with verbose output
pnpm test:integration --reporter=verbose
# Run specific test pattern
pnpm test:integration -- --testNamePattern="PostgreSQL"
# Check container logs
docker logs <container_id>
All integration tests follow this pattern:
IntegrationTestBase classUse this skill when:
src/connectors/__tests__/ - Integration test filesvitest.config.ts - Vitest configuration.github/workflows/ - CI/CD test workflowstools
Generate typed TypeScript SDKs for AI agents to interact with MCP servers. Converts verbose JSON-RPC curl commands to clean function calls (docs.createDocument() vs curl). Auto-detects MCP tools from server modules, generates TypeScript types and client methods, creates runnable example scripts. Use when: building MCP-enabled applications, need typed programmatic access to MCP tools, want Claude Code to manage apps via scripts, eliminating manual JSON-RPC curl commands, validating MCP inputs/outputs, or creating reusable agent automation.
testing
Generate structured task lists from specs or requirements. IMPORTANT: After completing ANY spec via ExitSpecMode, ALWAYS ask the user: "Would you like me to generate a task list for this spec?" Use when user confirms or explicitly requests task generation from a plan/spec/PRD.
tools
Create compelling story-format summaries using UltraThink to find the best narrative framing. Support multiple formats - 3-part narrative, n-length with inline links, abridged 5-line, or comprehensive via Foundry MCP. USE WHEN user says 'create story explanation', 'narrative summary', 'explain as a story', or wants content in Daniel's conversational first-person voice.
testing
Navigate through the original three-world shamanic technology. Deploy when soul retrieval, power animal guidance, or journey between realms emerges. Deeply respectful of Tungus, Buryat, Yakut, Evenki traditions. Use for consciousness navigation, NOT cultural appropriation.