Skip to content
Agentmart
Submit a tool

write-mongo-jstests

Write focused MongoDB jstests with explicit mocha cases, small mechanical topology helpers, purposeful comments, robust teardown, and correct ownership.

Skill by enricogolfieri

IndexedUnlicense★ 1
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/enricogolfieri-write-mongo-jstests

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Write focused MongoDB jstests with explicit mocha cases, small mechanical topology helpers, purposeful comments, robust teardown, and correct ownership. Use when authoring or restructuring a test under jstests/ or src/mongo/**/jstests/.

Use cases: testing, writing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/write-mongo-jstests

What's inside

Skill name
write-mongo-jstests
Description
Write focused MongoDB jstests with explicit mocha cases, small mechanical topology helpers, purposeful comments, robust teardown, and correct ownership. Use when authoring or restructuring a test under jstests/ or src/mongo/**/jstests/.
License
Unlicense
Instructions
41 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Writing MongoDB jstests

Apply these rules when creating or restructuring a MongoDB JavaScript test.

## 1. Explicit Scenarios

Use mocha-style `describe` and `it` from `jstests/libs/mochalite.js`.

Each independently meaningful scenario gets its own `it`. Do not hide scenarios in a table, loop, or
generic operation matrix. Do not put multiple operations under test in one case when each operation
has a separate requirement.


## 2. Helpers

Keep helpers minimal. Stay as explicit as possible and use helpers only for repetitive task that include several operations. 


## 3. Comments And Spacing

Comments must explain non-obvious topology intent or mark the three meaningful phases of a case.
Keep comments short. Every phase comment must have a blank line before it, and the next phase must be
separated by a blank line after the preceding assertion. Use this exact visual structure in every
positive case:

```js
// Setup is above this section.

// Drop the sessions collection on the new first shard.
assert.commandWorked(configDB.runCommand({drop: "system.sessions"}));
assert.eq(null, configDB.collections.findOne({_id: kSessionsNs}));

// Run the transaction after the drop.
session.startTransaction();
// ... operation and assertion ...

// Verify the sessions collection remains available.
assertSessionsCollectionTracked();
```

From enricogolfieri/workspace-mongo, Unlicense.

More from enricogolfieri/workspace-mongo

Signals

Stars
1
Forks
0
Open issues
0
Last commit (this folder)
Aug 12, 2026 (2 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Unlicense
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from enricogolfieri

Cite this page

write-mongo-jstests skill. Agent Mart. https://agentmart.dev/skills/enricogolfieri-write-mongo-jstests (last updated 2026-10-24)