testing-patterns
TDD patterns, Jest testing conventions, and test quality standards. Use when writing any tests.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
TDD patterns, Jest testing conventions, and test quality standards. Use when writing any tests.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Code review standards for automated and manual reviews. Use when reviewing code changes.
Ensure documentation stays in sync with code changes. Trigger when modifying CLI commands, config options, directory structure, or public APIs.
Git branch naming, commit conventions, and PR workflow. Use for all git operations.
Two-layer feature planning (business + technical). Use when planning any feature before implementation starts.
Comprehensive security vulnerability scanning and OWASP Top 10 compliance checking. Use when reviewing code for security issues, validating authentication/authorization, or ensuring security best practices.
Comprehensive patterns for writing robust non-brittle tests including eliminating waitForTimeout, mocking time properly, and generating unique test data. Use when writing any tests to ensure fast reliable maintainable test suites.
| name | testing-patterns |
| description | TDD patterns, Jest testing conventions, and test quality standards. Use when writing any tests. |
| auto_load | true |
| priority | high |
When writing tests or implementing features that need tests.
describe('ModuleName', () => {
describe('functionName', () => {
it('should do expected behavior when given input', () => {
// Arrange
const input = createTestInput();
// Act
const result = functionName(input);
// Assert
expect(result).toEqual(expectedOutput);
});
it('should throw when given invalid input', () => {
expect(() => functionName(null)).toThrow();
});
});
});
should return 404 when user not foundtest getUserByIdbeforeEach for setup, not beforeAll for mutable statejest.mock() at module level, jest.spyOn() for specific methodsjest.restoreAllMocks() in afterEachwaitForTimeout() or sleep() in testsany type assertions to make tests pass