CtrlK
BlogDocsLog inGet started
Tessl Logo

generating-test-doubles

This skill uses the test-doubles-generator plugin to automatically create mocks, stubs, spies, and fakes for unit testing. It analyzes dependencies in the code and generates appropriate test doubles based on the chosen testing framework, such as Jest, Sinon, or others. Use this skill when you need to generate test doubles, mocks, stubs, spies, or fakes to isolate units of code during testing. Trigger this skill by requesting test double generation or using the `/gen-doubles` or `/gd` command.

90

1.00x
Quality

53%

Does it follow best practices?

Impact

97%

1.00x

Average score across 9 eval scenarios

SecuritybySnyk

Passed

No known issues

Optimize this skill with Tessl

npx tessl skill review --optimize ./backups/skills-migration-20251108-070147/plugins/testing/test-doubles-generator/skills/test-doubles-generator/SKILL.md
SKILL.md
Quality
Evals
Security

Evaluation results

100%

Weather Dashboard: Unit Tests for Data Fetching Layer

Jest mock generation for HTTP dependencies

Criteria
Without context
With context

Dependency identified

100%

100%

Jest framework used

100%

100%

Mock type chosen

100%

100%

Simulates API response

100%

100%

Paste-ready code

100%

100%

Behavior verification

100%

100%

No Sinon or other lib

100%

100%

Source code analysed

100%

100%

100%

Order Processing Service: Isolating the Email Dependency

Sinon stub generation for service dependencies

Criteria
Without context
With context

Sinon framework used

100%

100%

Stub type chosen

100%

100%

Dependency identified

100%

100%

Controlled response

100%

100%

Paste-ready code

100%

100%

Stub restored or sandbox used

100%

100%

No Jest APIs used

100%

100%

Source code analysed

100%

100%

100%

Analytics Middleware: Verifying Logging Calls Without Breaking Behavior

Spy usage for interaction tracking

Criteria
Without context
With context

Spy type chosen

100%

100%

Real implementation preserved

100%

100%

Interaction verified

100%

100%

Dependency from source

100%

100%

Paste-ready code

100%

100%

Notes explain type choice

100%

100%

Spy cleanup

100%

100%

100%

Inventory Service: Unit Tests with Isolated Storage

Fake implementation for stateful dependency

Criteria
Without context
With context

Fake type used

100%

100%

Interface matches source

100%

100%

Stateful behaviour preserved

100%

100%

Paste-ready code

100%

100%

No mock/stub APIs used

100%

100%

Dependency identified from source

100%

100%

Test exercises the unit

100%

100%

Notes explain type choice

100%

100%

96%

Payment Processor: Unit Tests for a Multi-Dependency Service

Framework selection and test double type choice

Criteria
Without context
With context

Framework stated

100%

100%

Mock used for verification dependency

100%

100%

Stub used for controlled-response dependency

73%

73%

Type choice explained

100%

100%

Consistent framework APIs

100%

100%

Dependency names match source

100%

100%

Paste-ready code

100%

100%

Behavior-verification assertion

100%

100%

100%

User Onboarding Service: Comprehensive Unit Test Coverage

Dependency analysis and multi-type double generation

Criteria
Without context
With context

All dependencies identified

100%

100%

Method names match source

100%

100%

Three doubles generated

100%

100%

Correct types selected

100%

100%

Framework consistent

100%

100%

Paste-ready code

100%

100%

Notification mock verified

100%

100%

Dependency analysis documented

100%

100%

100%

Currency Converter Service: Unit Tests for External Rate Fetching

Python framework test doubles with unittest.mock

Criteria
Without context
With context

Python mock framework

100%

100%

HTTP dependency targeted

100%

100%

Mock type used

100%

100%

No real HTTP calls

100%

100%

Success path tested

100%

100%

Failure path tested

100%

100%

Behavior verification assertion

100%

100%

Paste-ready pytest code

100%

100%

Source names preserved

100%

100%

100%

File Upload Service: Hardening Error Handling in Unit Tests

Stub configuration for error and rejection scenarios

Criteria
Without context
With context

All three dependencies identified

100%

100%

Rejection/throw configured

100%

100%

Validation failure path tested

100%

100%

Storage failure path tested

100%

100%

Registry failure path tested

100%

100%

Short-circuit verified

100%

100%

Jest framework used

100%

100%

Source names preserved

100%

100%

Happy path tested

100%

100%

Paste-ready code

100%

100%

79%

1%

Task Queue Processor: Unit Tests for a Multi-Collaborator Worker

Dependency analysis for event-driven module with mixed double types

Criteria
Without context
With context

All four collaborators identified

100%

100%

EventBus spy used

0%

0%

Event emission verified

100%

100%

Stub used for data-returning deps

100%

100%

Failure path tested

100%

100%

Empty queue path tested

100%

100%

Happy path tested

100%

100%

Type rationale documented

41%

50%

Paste-ready Jest code

100%

100%

Source names preserved

100%

100%

Repository
jeremylongshore/claude-code-plugins-plus-skills
Evaluated
Agent
Claude Code
Model
Claude Sonnet 4.6

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.