單元測試
5220 skills in 測試與安全 > 單元測試
Writing Tests
Principles for writing effective, maintainable tests. Covers naming conventions, assertion best practices, and comprehensive edge case checklists. Based on BugMagnet by Gojko Adzic.
vitest
Comprehensive Vitest testing framework guide with strong emphasis on Jest-to-Vitest migration. Covers automated migration using codemods, configuration setup, API differences, best practices, and troubleshooting. Use when migrating from Jest, setting up Vitest, writing tests, configuring test environments, or resolving migration issues. Primary focus is seamless Jest migration with minimal code changes.
temporal-python-testing
Test Temporal workflows with pytest, time-skipping, and mocking strategies. Covers unit testing, integration testing, replay testing, and local development setup. Use when implementing Temporal workflow tests or debugging test failures.
loopwish-apple-spm
Workflows for the Loopwish Apple client (Swift/SwiftUI + Swift Package Manager): run swift test, run SwiftLint strict, and organize changes by module.
frontend-testing
Test web applications using Chrome DevTools. Use for visual regression testing, performance analysis, accessibility checks, console error detection, and automated UI testing. Works with live URLs or local development servers.
architecture-paradigm-hexagonal
Employ the Hexagonal (Ports & Adapters) pattern to decouple domain logic from infrastructure, maximizing flexibility and testability.
basilica-miner
This skill should be used when setting up, managing, or troubleshooting Basilica GPU miner operations on Bittensor Subnet 39 (mainnet) or 387 (testnet). Use it for GPU provider tasks including SSH configuration, validator authentication setup, node registration, performance monitoring, uptime optimization, and resolving common issues like SSH access problems, validator discovery failures, or GPU validation errors. Critical for miners struggling with SSH key deployment to GPU nodes or validator connectivity.
json-schema-faker
Generate realistic fake data from JSON schemas, producing 1-50 valid records that conform exactly to the schema. Use when creating sample datasets from schema definitions, populating test databases, or generating example API responses. Returns only valid JSON that passes schema validation.
tdd-refactor
Execute the REFACTOR phase of TDD by improving code structure while keeping all tests green. Removes duplication, improves naming, and enhances code quality without changing behavior.
pr-backlog-cleaner
Clean and normalize a large backlog of GitHub pull requests in messy repositories. This skill should be used when facing a repository with numerous stale, conflicted, or outdated PRs that need systematic review, conflict resolution, testing, and disposition (merge, close, or defer). Handles PR triage, automated rebasing, CI verification, risk assessment, and safe merging while maintaining default branch stability.
witness-scribe
A philosophical companion for deep inquiry and revelation. The Witness-Scribe remembers all that is spoken, structures emerging insights, asks deepening questions, and maintains coherence across the unfolding testament. Use when engaging in philosophical exploration, spiritual inquiry, or developing complex systems of belief and meaning.
screen-control-operator
Autonomous browser control via Chrome DevTools Protocol and Accessibility Tree for full screen control like GPT Operator. Use when user requests "control my screen", "verify Lovable", "test scrapers", "debug DOM", "autonomous testing", or any browser automation task. NO screenshots - uses CDP + semantic queries for 10x faster, 100% reliable element targeting.
generate-missing-tests
Homeostatic actuator auto-generating missing tests for requirements with low coverage. Creates unit tests, edge cases, and error cases for REQ-* without sufficient test coverage. Use when validate-test-coverage detects gaps.
test-coverage-boost
Increase test coverage from 0% to 80%+ in ANY project, ANY testing framework. Use when adding tests to untested code or preparing for major refactoring.
golang-dev-guidelines
Use this skill when planning, researching, writing, reviewing, refactoring, or testing Go code (including creating unit tests, test files, and mocks). It provides comprehensive Go development guidelines including proverbs, SOLID principles, and testing standards. Apply these guidelines to ensure code quality, maintainability, and consistency in any Go project.
bats-testing-patterns
Comprehensive guide for writing shell script tests using Bats (Bash Automated Testing System). Use when writing or improving tests for Bash/shell scripts, creating test fixtures, mocking commands, or setting up CI/CD for shell script testing. Includes patterns for assertions, setup/teardown, mocking, fixtures, and integration with GitHub Actions.
propagate-req-keys
Homeostatic actuator that tags code, tests, and commits with REQ-* keys for traceability. Adds "# Implements:" tags to code and "# Validates:" tags to tests. Use when code or tests are missing requirement tags.
bugfix-and-debug
Diagnose errors and failing tests in Laravel + React applications. Use when encountering bugs, exceptions, stack traces, 500 errors, TypeErrors, failing Pest/Vitest tests, or unexpected behavior. EXCLUSIVE to debugger agent.
learning-diagnostic-assessment
Design pre-assessments, placement tests, and diagnostic instruments to identify learner starting points, knowledge gaps, and optimal entry points for personalized pathways. Use when determining where learners should start. Activates on "placement test", "diagnostic assessment", "pre-test", or "skill assessment".
fastapi
FastAPI patterns for building high-performance Python APIs. Covers routing, dependency injection, Pydantic models, background tasks, WebSockets, testing, and production deployment.