agentsclimarketplace

Jest test file naming test only

Skill kjuhwa/skills-hub/skills/frontend/jest-test-file-naming-test-only

Self-correcting knowledge corpus for Claude Code — 9 stable shape clusters, bias-correction pipeline baked into contribution flow. 47 papers, 45 techniques, 1.1k skills.

Install
npx -y skills add kjuhwa/skills-hub --skill jest-test-file-naming-test-only

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Use .test.ts naming (not .spec.ts) and explicitly import jest globals; .spec.ts is excluded from the runner

SKILL.md

0.9 KB, as published. Nobody here has run it

Jest naming & globals

Trigger

  • Adding a new Jest test file.
  • Debugging a "test file not detected" report.

Steps

  1. Name test files {subject}.test.ts (or .test.tsx). Do not use .spec.ts — the Jest config excludes it.
  2. Place the test in the same folder as its subject.
  3. Explicitly import jest globals:
    import { describe, it, expect } from "@jest/globals";
    
  4. Write three case classes per function: normal, boundary (empty/min/max), exception (invalid input).
  5. Use jest.mock, jest.fn, jest.spyOn for isolation.
  6. Check coverage stays within the project's 80% threshold (branches/functions/lines/statements).

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.