unit-testing SKILL.md skillA
unit-testing from petrkindlmann/qa-skills is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add petrkindlmann/qa-skills/unit-testing@v2.0Pins v2.0 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- petrkindlmann/qa-skills
- Path
skills/unit-testing/SKILL.md- Versions recorded
- 5
- Latest version
- v2.0, committed Jun 10, 2026
- First version recorded
- Mar 30, 2026
- Size
- 15,700 bytes
- Repository stars
- 245
- License
- MIT
Write effective unit tests with Jest, Vitest, or pytest. Covers the test-doubles taxonomy (stub/spy/mock/fake), Arrange-Act-Assert, coverage threshold configuration and CI gating, snapshot testing, fake timers, and mutation testing with Stryker/mutmut. Use when: "unit test," "Jest," "Vitest," "pytest," "mock," "coverage threshold," "test doubles," "mutation testing," "fake timers," "snapshot test." Not for: interpreting coverage reports or finding coverage gaps — use coverage-analysis; AI…
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
<objective> Write unit tests that fail when the code is wrong and pass when it is right — nothing weaker. A test that mocks every collaborator stays green while the integration is broken; the doubles taxonomy below stops that. A `coverageThreshold` typo (or the plural `coverageThresholds`, which Jest silently ignores) lets 40%-covered code ship on a green pipeline; the config and Verification sections below make the gate actually fire. This skill covers Jest, Vitest, and pytest: doubles, coverage gating, snapshots, fake timers, and mutation testing as a behavior check on top of coverage. </objective> --- ## Discovery Questions Check `.agents/qa-project-context.md` first — if it exists, use it and skip anything answered there. 1. **Framework:** Jest, Vitest, or pytest? Check `package.json` or `pyproject.toml`. The runner decides config keys and mock APIs. 2. **Coverage tooling:** Already configured? Look for `jest.config.*`, `vitest.config.*`, `.nycrc`, `[tool.coverage]`. Determines whether you add the gate or just tune it. …
Read the whole file at its exact version.
How to install
mdr add petrkindlmann/qa-skills/unit-testing@sha256:6ae2bf6de212f3d2The line at the top of this page pins the label v2.0, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_nqfwj3fv5z2ahc3e)
5 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 5 versions of this file, between Mar 30, 2026 and Jun 10, 2026, about one every 18 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| v2.0 latest | 2026-06-10 | bcd1201 | 15,700 B | A | view · diff |
| v1.0 | 2026-05-10 | f124fd9 | 15,605 B | A | view · diff |
| v1.0 | 2026-05-10 | a1e1025 | 15,400 B | A | view · diff |
| v1.0 | 2026-05-10 | 158e50a | 14,419 B | A | view · diff |
| v1.0 | 2026-03-30 | 59713a4 | 13,651 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (15700 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
petrkindlmann/qa-skills · 245 stars · license MIT · pushed 2026-10-22 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_nqfwj3fv5z2ahc3e GET https://markdownregistry.com/api/v1/resolve?ref=petrkindlmann/qa-skills/unit-testing GET https://markdownregistry.com/api/v1/blob/6ae2bf6de212f3d2e1202f8964c56063cc22331d7b484e687a0b8c58992f9f21
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.
More from petrkindlmann/qa-skills
Every file in petrkindlmann/qa-skills