單元測試
5220 skills in 測試與安全 > 單元測試
surgical-injector
Safely inject new code into legacy codebases with risk containment. Use for feature flags, gradual rollouts, A/B testing new logic, or refactoring critical paths. Implements try-catch fallbacks, feature toggle architecture, and surgical separation of old/new code.
programming-common
General programming best practices applicable to all languages. Covers clean code, testing, refactoring, version control, and development workflows. Use when writing or reviewing code in any language.
test-generator
Generate comprehensive unit, integration, and E2E tests with edge cases, mocks, and assertions. Use when writing tests for functions, classes, APIs, or implementing TDD.
acxcodeassistant
Generate code scaffolds following Carbon ACX conventions for React components, TypeScript APIs, Cloudflare Workers, Python scripts, and tests.
run-server
Start the Gambit game server on 0.0.0.0:1234. Use when the user wants to run just the server, test server functionality, or manually test with clients.
pre-push
Run CI-equivalent checks before git push. Executes format, lint, test, and meta check in order. Automatically fixes errors and retries until all checks pass.
configuring-vitest-4
Configure Vitest 4.x with correct pool architecture, coverage settings, and multi-project setup. Use when creating or modifying vitest.config files or setting up test infrastructure.
tdd-green
Execute the GREEN phase of TDD by implementing the minimum code needed to make the failing test pass. Follows the principle of simplest solution that could possibly work.
mock-strategy-guide
Guides users on creating mock implementations for testing with traits, providing test doubles, and avoiding tight coupling to test infrastructure. Activates when users need to test code with external dependencies.
unit-test-generation
Generate comprehensive unit tests for source files with 100% coverage target. Use when writing tests for React components, utility functions, hooks, or API routes. Supports Jest and Vitest frameworks following Pandora coding standards.
widget-tester
Expert assistant for testing the embeddable Bible widget functionality in the KR92 Bible Voice project. Use when creating widget tests, validating embed API responses, testing reference formats, checking audio integration, or creating regression test cases.
test-planning
Design test strategy with concrete test cases. Use before writing tests.
playwright-automation
Use when Codex must browse, interact with, or test web flows via the remote Playwright MCP server hosted on Glama.
test-helper
Generate comprehensive async pytest tests for Quart endpoints, database operations, and WebSocket connections. Activates when writing tests or ensuring code coverage.
test-driven-development
Use when implementing any feature or bugfix, before writing implementation code - write the test first, watch it fail, write minimal code to pass; ensures tests actually verify behavior by requiring failure first
accessibility-testing
Accessibility testing with axe-core and Playwright. Use when implementing a11y tests.
python-best-practices
Python development best practices, patterns, and conventions. Use when writing Python code, reviewing .py files, discussing pytest, asyncio, type hints, pydantic, dataclasses, or Python project structure. Triggers on mentions of Python, pytest, mypy, ruff, black, FastAPI, Django, Flask.
cloudflare-cron-triggers
Complete knowledge domain for Cloudflare Cron Triggers - scheduled execution of Workers usingcron expressions for periodic tasks, maintenance jobs, and automated workflows.Use when: scheduling Workers to run periodically, adding cron triggers to Workers, configuringscheduled tasks, testing cron handlers, combining crons with Workflows, enabling Green Compute,handling multiple schedules, or encountering "scheduled handler not found", "cron expression invalid","changes not propagating", "handler does not export", "timezone issues" errors.Keywords: cloudflare cron, cron triggers, scheduled workers, scheduled handler, periodic tasks,background jobs, scheduled tasks, cron expression, wrangler crons, scheduled event, green compute,workflow triggers, maintenance tasks, scheduled() handler, ScheduledController, UTC timezone
bdd-feature-generator
Creates BDD feature files for Golang Clean Architecture projects using Gherkin syntax. Use when users need to write .feature files for integration tests, create test scenarios for APIs, or generate Cucumber/Godog test specifications. Specifically for projects that follow Clean Architecture patterns with existing step definitions.
methodical-debugging
Systematic debugging approach using parallel investigation and test-driven validation. Use when debugging issues, when stuck in a loop of trying different fixes, or when facing complex bugs that resist standard debugging approaches.