Skip to content
Muse SkillsIndependent
Submit a skill

Test Case Generator

Paste a function, get the test cases including the edge cases you'd skip.

Tested in Museprompt packDev & automationprompt-text

by Muse Skills editors · Written for this directory

View source

Ready to copy.

What it does

Test Case Generator is a prompt pack for the function with zero tests. Paste the code; get happy-path, edge-case, and error-case tests with names that say what’s verified, plus one test aimed at the bug most likely hiding in that code. Untestable functions get a refactor suggestion instead of brittle tests.

What it includes

  • Happy-path tests with realistic inputs
  • Edge cases: empty, null, zero, boundaries
  • Error cases with expected behavior
  • Most-likely-bug test with the reasoning

Example

Input: a calculateDiscount(price, code) function.

Output (abridged):

test('applies SAVE10 to a normal price', ...)
test('rejects an expired code', ...)
// most likely bug: code comparison is case-sensitive,
// "save10" fails silently. This test pins the behavior.
test('handles lowercase promo codes', ...)

What this one touches

Drafts test cases from the code you paste. Never runs them against anything.

Install

Copy this block and paste it into your Muse chat. Muse does the install and confirms when it's done.

Install prompt

Full source

This is the exact text Muse installs. Read it. That's the whole trust model.

SKILL.md
This prompt pack generates test cases for a function.
Paste it into Muse along with the function code.

> Write test cases for this function in [framework]. Cover:
> (1) the happy path with realistic inputs, (2) edge cases:
> empty, null, zero, boundaries, and max sizes, (3) error
> cases, invalid inputs and what the function should do with
> each, and (4) one test for the bug most likely to hide here,
> with a comment saying why it's likely. Rules: each test gets
> a name that says what's being verified, no testing the
> framework itself, and if the function is untestable as
> written (hidden dependencies, no seams), say so and suggest
> the smallest refactor that fixes it instead of writing
> brittle tests.
  • Release Notes Writer

    Turns commits and merged PRs since the last tag into a changelog draft worth shipping.

    skillinstructionsworkflowchangelog-templatemigration-notes

    by Muse Skills editors · Written for this directory

    View
  • Release Radar

    Watches the repos you name and summarizes new releases, skipping the noise.

    skillinstructionsworkflowrepo-watch-list

    by Muse Skills editors · Written for this directory

    View
  • Dependency Update Triage

    Turns a scary outdated-dependencies list into safe-now, review, and hold buckets.

    Tested in Museskillinstructionsworkflowreport

    by Muse Skills editors · Written for this directory

    View
  • Git Commit Writer

    Your diff in, conventional-commit message out.

    Tested in Museprompt packprompt-text

    by Muse Skills editors · Written for this directory

    View