agentsclimarketplace

Write unit tests

Skill emaraschio/cursor-commands/plugin/.cursor/skill-contracts/write-unit-tests

Write meaningful unit tests for target codeFrom its SKILL.md

Install
npx -y skills add emaraschio/cursor-commands --skill write-unit-tests

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

  • 9 stars9 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.

SKILL.md

2.0 KB, 391 tokens by cl100k_base, as published. Nobody here has run it

Overview

Create comprehensive unit tests for the current code and generate the test file with proper imports and setup according to the project's testing conventions.

Steps

  1. Test Coverage
    • Test all public methods and functions
    • Cover edge cases and error conditions
    • Test both positive and negative scenarios
    • Aim for high code coverage
  2. Test Structure
    • Use the project's testing framework conventions
    • Write clear, descriptive test names
    • Follow the Arrange-Act-Assert pattern
    • Group related tests logically
  3. Test Cases to Include
    • Happy path scenarios
    • Edge cases and boundary conditions
    • Error handling and exception cases
    • Mock external dependencies appropriately
  4. Test Quality
    • Make tests independent and isolated
    • Ensure tests are deterministic and repeatable
    • Keep tests simple and focused on one thing
    • Add helpful assertion messages

Write Unit Tests Checklist

  • Tested all public methods and functions
  • Covered edge cases and error conditions
  • Tested both positive and negative scenarios
  • Used the project's testing framework conventions
  • Written clear, descriptive test names
  • Followed the Arrange-Act-Assert pattern
  • Included happy path scenarios
  • Included edge cases and boundary conditions
  • Mocked external dependencies appropriately
  • Made tests independent and isolated
  • Ensured tests are deterministic and repeatable

Guardrails

  • Test observable behavior and public contracts, not implementation trivia.
  • Mock only external boundaries (network, clock, filesystem); use real objects for the rest.
  • Do not commit, push, merge, or run destructive commands without explicit user consent.
  • Do not print, log, or commit secrets or credentials found in the code or test fixtures; flag any exposure instead.

What ships with it: 3 files

2.7 KB alongside SKILL.md

eval/

Keep looking

Skills are one crate of 326,871. 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.