Loading...
Loading...
Found 166 Skills
单元测试编写指南,涵盖 JUnit5/MockK 使用、测试命名规范、Mock 技巧、测试覆盖率要求、TDD 实践。当用户编写单元测试、Mock 依赖、提高测试覆盖率或进行测试驱动开发时使用。
Complete unit testing skill for TypeScript/NestJS projects using Jest, @golevelup/ts-jest, and in-memory databases. ALWAYS use this skill when user needs to: **SETUP** - Initialize or configure unit testing: - Set up Jest for a new project - Configure test infrastructure (jest.config.ts) - Install testing dependencies (@nestjs/testing, @golevelup/ts-jest) - Create mock helpers or test utilities - Set up coverage configuration **WRITE** - Create or add unit tests: - Write, create, add, or generate unit tests - Test a service, usecase, controller, guard, interceptor, pipe, or filter - Add tests for new code or features - Improve test coverage or add missing tests - Mock dependencies or set up test fixtures - Working on any file ending in .spec.ts **REVIEW** - Audit or evaluate unit tests: - Review existing tests for quality - Check test coverage and gaps - Audit testing patterns and conventions - Evaluate assertion quality **RUN** - Execute or analyze test results: - Run unit tests - Analyze test results or coverage reports - Understand test failures or successes - Check which tests are passing/failing **DEBUG** - Fix failing or broken tests: - Fix failing unit tests - Debug test errors or exceptions - Resolve mock issues or setup problems - Troubleshoot test timeouts or flaky tests - Diagnose "undefined" or unexpected results **OPTIMIZE** - Improve test performance and maintainability: - Speed up slow tests - Fix open handles preventing clean exit - Improve test organization - Reduce test execution time - Clean up test code Keywords: unit test, spec, jest, typescript, nestjs, mock, DeepMocked, createMock, AAA, test coverage, TDD, .spec.ts, testing, write test, add test, create test, fix test, debug test, run test, review test, optimize test, test setup, jest config
Use when writing or reviewing Java unit tests. Enforces Mockito/JUnit 5 best practices - strict stubbing, no lenient mode, specific matchers, complete flow stubbing, Arrange-Act-Assert structure, and clear test naming.
Write comprehensive unit tests with high coverage using testing frameworks like Jest, pytest, JUnit, or RSpec. Use when writing tests for functions, classes, components, or establishing testing standards.
This skill should be used when the user asks to "write unit tests", "follow unit testing best practices", "improve test quality", "structure test cases", or needs guidance on unit testing concepts, patterns, and principles.
Use when you need to review, improve, or write Java unit tests — including migrating from JUnit 4 to JUnit 5, adopting AssertJ for fluent assertions, structuring tests with Given-When-Then, ensuring test independence, applying parameterized tests, mocking dependencies with Mockito, verifying boundary conditions (RIGHT-BICEP, CORRECT, A-TRIP), leveraging JSpecify null-safety annotations, or eliminating testing anti-patterns such as reflection-based tests or shared mutable state. Part of the skills-for-java project
Automates unit test creation for C++ projects using GoogleTest (GTest) framework with consistent software testing patterns including In-Got-Want, Table-Driven Testing, and AAA patterns. Use when creating, modifying, or reviewing unit tests, or when the user mentions unit tests, test coverage, or GTest.
Automates unit test creation for Go projects using the standard testing package with consistent software testing patterns including In-Got-Want, Table-Driven Testing, and AAA patterns. Use when creating, modifying, or reviewing unit tests, or when the user mentions unit tests, test coverage, or Go testing.
Unit testing patterns and best practices. Use when writing isolated unit tests, implementing AAA pattern, designing test isolation, or setting coverage targets for business logic.
CUI Java unit testing standards and patterns with JUnit 5, generators, and value object testing
Generate comprehensive, maintainable unit tests across languages with strong coverage and edge case focus.
Guidance for dependency injection in .NET MAUI apps — service registration, lifetime selection (Singleton/Transient/Scoped), constructor injection, automatic resolution via Shell navigation, explicit resolution patterns, platform-specific registrations, and testability best practices. USE FOR: "dependency injection", "DI registration", "AddSingleton", "AddTransient", "AddScoped", "service registration", "constructor injection", "IServiceProvider", "MauiProgram DI", "register services". DO NOT USE FOR: data binding (use maui-data-binding), Shell route setup (use maui-shell-navigation), or unit test mocking patterns (use maui-unit-testing).