CtrlK
BlogDocsLog inGet started
Tessl Logo
PluginPublic

testland/js-unit-tests

Sets up and repairs JavaScript / TypeScript unit tests - a suite that cannot resolve the project's path aliases (`@lib/...` declared in jsconfig or tsconfig), a regression that shipped because the tests asserted too little, or a module dependency that needs mocking, spying, or fake timers. 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). Use when authoring, configuring, or repairing unit tests in a JS/TS project.

97

1.00x
Quality

95%

Does it follow best practices?

Impact

98%

1.00x

Average score across 10 eval scenarios

SecuritybySnyk

Passed

No findings from the security scan

Overview
Quality
Evals
Security
Files

Quality

Content

92%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 high-quality SKILL.md body: fully executable guidance organized as a sequenced framework-selection + setup workflow with explicit validation checkpoints and a verified, well-signaled one-level-deep reference bundle. The only trimmable fat is the trivial first-test and basic-mocking examples that restate what Claude already knows.

DimensionReasoningScore

Conciseness

The body is dense and leans on non-obvious gotchas (Jest 27+ `testEnvironment` default change, `vi.mock` hoisting leaking `undefined`, bare `vitest` hanging CI), but the trivial `sum.test.js` first-test examples and basic `jest.fn()` usage restate knowledge Claude already has and could be trimmed - minor over-explanation rather than a fully lean body.

4 / 5

Actionability

Every section is copy-paste executable: exact install commands, complete annotated `jest.config.js` and `defineConfig` configs, package.json script blocks, CI YAML with specific flags (`--ci`, `--maxWorkers=2`, `--reporter=junit`), and a worked `jest.mock` example - fully covering the common cases.

5 / 5

Workflow Clarity

Steps 1-6 are clearly sequenced behind a decision procedure ("Detect the framework, never assume... If two frameworks' signals coexist, stop and ask") and include explicit validation checkpoints (coverage-threshold gating that fails the run, `vitest run --typecheck`, `--ci` failing on missing snapshots) plus an anti-patterns table mapping each failure mode to its fix.

5 / 5

Progressive Disclosure

The three bundle references (mocha.md, legacy-migration.md, jest-coverage.md) are real, substantive, one level deep with no nested references, and each is signaled with an explicit consultation condition (e.g., "maintaining a Mocha codebase → references/mocha.md"); deep material is delegated while the core lifecycle stays inline, and navigation via headers and links is easy.

5 / 5

Total

19

/

20

Passed

Description

96%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 strong description: third-person, concrete, and comprehensive across the setup/repair lifecycle, with an explicit 'Use when' trigger clause and natural Jest/Vitest terminology. Its only weakness is slight trigger overlap with an adjacent assertion-quality skill via the 'tests asserted too little' scenario.

DimensionReasoningScore

Specificity

The description lists multiple concrete actions covering the full lifecycle - "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)" - with real API and config-file names, matching the comprehensive-coverage anchor rather than the minor-gaps anchor.

5 / 5

Completeness

It 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 mirroring the top anchor; the when-clause is explicit and specific rather than merely present.

5 / 5

Trigger Term Quality

It includes the natural phrases users would actually say - "unit tests", "Jest", "Vitest", "mocking", "coverage", "watch mode", "CI", "path aliases", "jsconfig or tsconfig" - along with synonyms (JavaScript / TypeScript, mocking/spying) and concrete file names (`jest.config.js`, `vite.config.ts`), leaving no common variation missing.

5 / 5

Distinctiveness Conflict Risk

The Jest/Vitest unit-test lifecycle niche (config, mocking, coverage, CI) is clearly distinct with domain-specific triggers, but the symptom phrase "a regression that shipped because the tests asserted too little" brushes against a sibling test-hygiene skill's assertion-quality territory, creating minor overlap risk.

4 / 5

Total

19

/

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.

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Reviewed

Table of Contents