CtrlK
BlogDocsLog inGet started
Tessl Logo

testland/js-unit-tests

JavaScript/TypeScript unit testing with Jest and Vitest as co-primary frameworks - install, config (`jest.config.js` / `vite.config.ts` test block), mocking (`jest.fn`/`jest.mock`/`jest.spyOn`, `vi.fn`/`vi.mock`/`vi.spyOn`, `__mocks__/`, fake timers), coverage (Istanbul/babel vs v8 providers, `coverageThreshold` gating), watch mode, and CI (`jest --ci`, `vitest run`, JUnit XML). Includes framework choice (Vite project → Vitest, otherwise Jest; always match an existing convention), test-authoring conventions (framework detection from package.json + config files, ESM vs CJS, no fabricated exports), and references for Mocha maintenance, Jasmine/Karma-to-Jest migration via jest-codemods, and deep Jest/Vitest coverage analysis. Use for any JS/TS unit-test task: setting up a framework, writing or mocking tests, gating coverage, or wiring CI.

75

Quality

94%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

Overview
Quality
Evals
Security
Files

Quality

Content

86%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A tightly organized, highly actionable reference with executable code at every step and a clean one-level-deep bundle structure. Its only weakness is mild over-explanation in the Overview/framework-comparison prose and a missing explicit post-authoring verification checkpoint.

Suggestions

Tighten the Overview and 'Choosing a framework' prose to the decision rule itself; drop the restated Jest/Vitest feature lists Claude already knows.

Add an explicit validation step to the authoring workflow (e.g. 'Run the new test and confirm it fails without the change / passes with it') to close the workflow-clarity gap.

Trim the Vitest doc quote in the Overview to a one-line rationale for choosing Vitest in a Vite project.

DimensionReasoningScore

Conciseness

The body is dense and mostly assumes Claude's competence (tight code blocks, gotchas, an anti-pattern table), but the Overview and framework-comparison prose restates Jest/Vitest characteristics Claude largely already knows, so it sits just below the lean/efficient anchor.

4 / 5

Actionability

Provides copy-paste-ready install commands, full `jest.config.js`/`vite.config.ts` blocks, executable mock and fake-timer snippets, coverage commands, and a CI YAML block covering the common cases, matching the fully-executable anchor.

5 / 5

Workflow Clarity

Steps 1-6 (Install → First test → Configuration → Mocking → Coverage → Watch/CI) are clearly sequenced with checkpoints like 'detect the framework, never assume' and CI guards (`vitest run`, `--typecheck`), but there is no explicit 'run and verify the test passes' validation loop in the authoring steps, leaving it just below the top anchor.

4 / 5

Progressive Disclosure

SKILL.md is an overview that pushes deep material to well-signaled one-level-deep references (references/mocha.md, legacy-migration.md, jest-coverage.md, all present in the bundle), with content appropriately split and easy to navigate, matching the top anchor.

5 / 5

Total

18

/

20

Passed

Description

100%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A dense, well-scoped description that covers what, when, and how with concrete API and config references in third person. It earns the top anchor on every dimension with no padding or over-claims.

DimensionReasoningScore

Specificity

Lists multiple concrete actions across the full lifecycle - install, config (`jest.config.js`/`vite.config.ts` test block), mocking (`jest.fn`/`jest.mock`/`jest.spyOn`, `vi.*`, `__mocks__/`, fake timers), coverage (Istanbul/babel vs v8, `coverageThreshold` gating), watch mode, and CI (`jest --ci`, `vitest run`, JUnit XML) - matching the comprehensive-coverage anchor.

5 / 5

Completeness

Explicitly answers both: what ('Sets up and repairs JavaScript / TypeScript unit tests ...') and when ('Use when authoring, configuring, or repairing unit tests in a JS/TS project.'), with concrete trigger phrases, matching the top anchor.

5 / 5

Trigger Term Quality

Covers the natural terms users say - 'unit tests', 'JavaScript / TypeScript', 'Jest', 'Vitest', 'mocking', 'spying', 'fake timers', 'coverage', 'CI' - including synonyms and config-file extensions, matching the comprehensive-synonym anchor.

5 / 5

Distinctiveness Conflict Risk

Carves a clear JS/TS unit-testing niche (Jest/Vitest co-primary) and names boundary topics deferred to sibling skills (test-code-conventions, fake-clock-testing), giving distinct triggers with minimal conflict risk.

5 / 5

Total

20

/

20

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation16 / 16 Passed

Validation for skill structure

No warnings or errors.

Reviewed

Table of Contents