بنقرة واحدة
test-generation
Generate comprehensive tests following project testing patterns. Use after implementing features.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Generate comprehensive tests following project testing patterns. Use after implementing features.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
Use when converting architecture plans into implementation phases. Creates independent, bite-sized phase files that can be executed separately.
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
Extract design assets and metadata from Figma using the Figma REST API. Supports exporting frames/components as images, extracting node metadata, design tokens, and file structure. Use with ai-multimodal skill for comprehensive UI research.
Comprehensive codebase documentation generator following a layered methodology. This skill should be used when scanning and documenting a codebase for the first time, when creating onboarding documentation for new developers, when generating architecture overviews, walkthroughs, and API references. Supports README generation, architecture diagrams, entry point documentation, pattern guides, and edge case documentation.
Generate structured handoff summaries between workflow phases. Use when transitioning between RQPIV phases.
استنادا إلى تصنيف SOC المهني
| name | test-generation |
| description | Generate comprehensive tests following project testing patterns. Use after implementing features. |
Create consistent, comprehensive tests.
Reference: patterns/unit-tests.md
describe('[Unit Under Test]', () => {
describe('[method/function]', () => {
it('should [expected behavior] when [condition]', () => {
// Arrange
const input = ...;
const expected = ...;
// Act
const result = functionUnderTest(input);
// Assert
expect(result).toEqual(expected);
});
it('should throw [error] when [invalid condition]', () => {
// Arrange
const invalidInput = ...;
// Act & Assert
expect(() => functionUnderTest(invalidInput))
.toThrow(ExpectedError);
});
});
});
Reference: patterns/integration-tests.md
Reference: patterns/e2e-tests.md
| Type | Lines | Functions | Branches |
|---|---|---|---|
| Unit | 80% | 80% | 70% |
| Integration | 60% | 60% | 50% |
| E2E | Critical paths | - | - |
[should/does] [expected behavior] [when/given] [condition]
Examples:
should return user when valid ID providedshould throw NotFoundError when user does not existshould disable button when form is invalid// Arrange - set up test data and conditions
const input = createTestInput();
const mockService = createMock();
// Act - execute the code under test
const result = await functionUnderTest(input);
// Assert - verify the outcome
expect(result).toEqual(expectedOutput);
expect(mockService.method).toHaveBeenCalledWith(expectedArgs);
describe('User Service', () => {
describe('when creating a user', () => {
it('should save the user to the database', () => { });
it('should send a welcome email', () => { });
it('should return the created user', () => { });
});
describe('when the email is invalid', () => {
it('should throw a ValidationError', () => { });
});
});
Use: templates/test-template.ts
Save test reports to: docs/reviews/test-report-{session}.md