Write Tests
grafana/synthetic-monitoring-app
Write Jest integration and unit tests for the Grafana Synthetic Monitoring app using React Testing Library, MSW, and src/test helpers.
Generate mocks, stubs, spies, and fakes for dependency isolation.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill generating-test-doubles -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace generating-test-doubles --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/generating-test-doubles .claude/skills/generating-test-doubles && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "generating-test-doubles" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/generating-test-doubles into .claude/skills/generating-test-doubles/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "generating-test-doubles", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/generating-test-doublesType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill generating-test-doubles -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace generating-test-doubles --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/.curated/generating-test-doubles .agents/skills/generating-test-doubles && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "generating-test-doubles" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/generating-test-doubles into .agents/skills/generating-test-doubles/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "generating-test-doubles", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill generating-test-doubles -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace generating-test-doubles --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/.curated/generating-test-doubles .cursor/skills/generating-test-doubles && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "generating-test-doubles" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/generating-test-doubles into .cursor/skills/generating-test-doubles/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "generating-test-doubles", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/jeremylongshore/tons-of-skills-marketplace.git --path skills/.curated/generating-test-doubles--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill generating-test-doubles -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace generating-test-doubles --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/.curated/generating-test-doubles .gemini/skills/generating-test-doubles && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "generating-test-doubles" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/generating-test-doubles into .gemini/skills/generating-test-doubles/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "generating-test-doubles", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install jeremylongshore/tons-of-skills-marketplace generating-test-doublesInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill generating-test-doubles -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/.curated/generating-test-doubles .github/skills/generating-test-doubles && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "generating-test-doubles" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/generating-test-doubles into .github/skills/generating-test-doubles/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "generating-test-doubles", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill generating-test-doubles -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace generating-test-doubles --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/.curated/generating-test-doubles .opencode/skills/generating-test-doubles && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "generating-test-doubles" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/generating-test-doubles into .opencode/skills/generating-test-doubles/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "generating-test-doubles", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
generating-test-doublesGenerate mocks, stubs, spies, and fakes for dependency isolation.
Generating Test Doubles is an agent skill from jeremylongshore/tons-of-skills-marketplace. Generate mocks, stubs, spies, and fakes for dependency isolation. Use when creating mocks, stubs, or test isolation fixtures. Trigger with phrases like "generate mocks", "create test doubles", or "setup stubs".
Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including scripts, reference files and assets (for example `assets/README.md`, `references/README.md` and `scripts/README.md`). Compatibility notes: Designed for Claude Code
It sits in Testing & QA, covering Unit testing and Test generation. It works with Jest. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.
7 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 80f86df. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadWriteEditGrepGlobBash(test:doubles-*)From allowed-tools in the SKILL.md frontmatter.
Ships 3 files in scripts/ (Python), which the agent can run.
Shell commands in SKILL.md call:
tscFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
jestjs.iosinonjs.orgdocs.python.orggithub.commartinfowler.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Designed for Claude Code
From compatibility in the SKILL.md frontmatter.
Generating Test Doubles loads about 1.3k tokens when it runs, and up to ~1.3k if it reads all its reference files. Until then it costs about 59 tokens; SKILL.md has 488 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from jeremylongshore/tons-of-skills-marketplace at commit 80f86df, republished under its MIT licence (© jeremylongshore). 488 words, ~1,309 tokens.
.claude/skills/generating-test-doubles/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.Generate mocks, stubs, spies, and fakes to isolate units under test from external dependencies. Supports Jest mocks, Sinon.js stubs, Python unittest.mock, Go interfaces, and testdouble.js patterns.
strict mode enabled for type-safe mocks (if applicable)__mocks__/, test/doubles/, testutil/).jest.mock(), @patch, constructor injection, or Go interface substitution).tsc --noEmit or equivalent.__mocks__ auto-mock modules where applicable| Error | Cause | Solution |
|---|---|---|
TypeError: X is not a function | Mock missing a method from the real interface | Regenerate the double from the current interface definition; add the missing method |
| Mock leaking between tests | Shared mock state not reset in afterEach | Add jest.restoreAllMocks() or sinon.restore() in teardown hooks |
| Type mismatch on mock return value | Return type does not match interface contract | Use as ReturnType<typeof fn> or update the mock factory to return the correct type |
| Spy not recording calls | Spy created after the function was already bound | Create spies before the module under test imports the dependency |
| Over-mocking hides real bugs | Too many layers replaced with fakes | Limit mocks to true external boundaries (I/O, network); let pure logic run unmocked |
Jest mock factory for a UserRepository:
// __mocks__/userRepository.ts
export const createMockUserRepo = () => ({
findById: jest.fn().mockResolvedValue({ id: '1', name: 'Test User' }),
save: jest.fn().mockResolvedValue(undefined),
delete: jest.fn().mockResolvedValue(true),
});Python unittest.mock patch for an HTTP client:
from unittest.mock import patch, MagicMock
@patch('myapp.client.requests.get')
def test_fetch_data(mock_get):
mock_get.return_value = MagicMock(status_code=200, json=lambda: {"key": "value"}) # HTTP 200 OK
result = fetch_data("https://api.example.com/data")
assert result == {"key": "value"}
mock_get.assert_called_once()Go interface-based fake:
type FakeStore struct {
data map[string]string
}
func (f *FakeStore) Get(key string) (string, error) {
v, ok := f.data[key]
if !ok { return "", ErrNotFound }
return v, nil
}© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 5 other files (scripts, references, assets) in skills/.curated/generating-test-doubles of jeremylongshore/tons-of-skills-marketplace.
Open the folder on GitHubat commit 80f86df
Generating Test Doubles next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Generating Test Doubles this skilljeremylongshore/tons-of-skills-marketplace | 2.8k | — | ~1.3k | Automated safety check: Pass | MIT | |
| Write Testsgrafana/synthetic-monitoring-app | 171 | — | ~1.2k | Automated safety check: Pass | AGPL-3.0 | |
| Write Testsopenplayerjs/openplayerjs | 649 | — | ~1.8k | Automated safety check: Pass | MIT | |
| MoAI TDD Workflowmodu-ai/moai-adk | 1.2k | — | ~3.1k | Automated safety check: Pass | Apache-2.0 | |
| Test Patternsrohitg00/skillkit | 1.5k | — | ~1.8k | Automated safety check: Pass | Apache-2.0 | |
| Add TestsMichealWayne/fe-tools | 207 | — | ~359 | Automated safety check: Pass | None |
grafana/synthetic-monitoring-app
Write Jest integration and unit tests for the Grafana Synthetic Monitoring app using React Testing Library, MSW, and src/test helpers.
openplayerjs/openplayerjs
Write or extend Jest tests for OpenPlayerJS to this repo's exact conventions — makeCore factories, typed internals handles instead of as any, media property mocking, fake timers, ads/vast mocks, and…
modu-ai/moai-adk
Drives test-first development through the RED, GREEN, REFACTOR cycle, with a config switch that selects between TDD and a DDD workflow for existing code.
rohitg00/skillkit
Applies proven testing patterns — Arrange-Act-Assert (AAA), Given-When-Then, Test Data Builders, Object Mother, parameterized tests, fixtures, spies, and test doubles — to help write maintainable…
MichealWayne/fe-tools
Add or update Jest unit tests for fe-tools utilities. An agent skill from MichealWayne/fe-tools.
alirezarezvani/claude-skills
Generates unit tests, integration tests, and E2E tests for React/Next.js applications.
jeremylongshore/tons-of-skills-marketplace
Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.
jeremylongshore/tons-of-skills-marketplace
Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.
jeremylongshore/tons-of-skills-marketplace
Execute proactive auto-loading: automatically detects and loads agents.md files.
jeremylongshore/tons-of-skills-marketplace
Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.
jeremylongshore/tons-of-skills-marketplace
Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.
jeremylongshore/tons-of-skills-marketplace
Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.
Works with
Categories
Generate mocks, stubs, spies, and fakes for dependency isolation. Generating Test Doubles is an agent skill from jeremylongshore/tons-of-skills-marketplace. Generate mocks, stubs, spies, and fakes for dependency isolation.
Generating Test Doubles fits situations like: test isolation fixtures; with phrases like generate mocks; create test doubles.
Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill generating-test-doubles -a claude-code`. Or copy the skill folder (skills/.curated/generating-test-doubles in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/generating-test-doubles in your project. Claude Code loads it when a task matches its description.
Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill generating-test-doubles -a codex`. Or copy the skill folder (skills/.curated/generating-test-doubles in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/generating-test-doubles in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill generating-test-doubles -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/generating-test-doubles, .gemini/skills/generating-test-doubles, .github/skills/generating-test-doubles and .opencode/skills/generating-test-doubles in your project.
Going by SKILL.md and its folder, Generating Test Doubles needs Python for the scripts in its folder and the command-line tools its instructions call (tsc). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Write, Edit, Grep, Glob, Bash(test:doubles-*). Compatibility (from SKILL.md): Designed for Claude Code.
SKILL.md names 5 domains. As links in the text: jestjs.io, sinonjs.org, docs.python.org, github.com and martinfowler.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Generating Test Doubles is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.3k tokens (SKILL.md is roughly 5.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 17 tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Generating Test Doubles: Write Tests (grafana/synthetic-monitoring-app, 171 stars), Write Tests (openplayerjs/openplayerjs, 649 stars), MoAI TDD Workflow (modu-ai/moai-adk, 1.2k stars) and Test Patterns (rohitg00/skillkit, 1.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,825 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 9, 2026.
Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.