Back to dashboardunit-testing

name: unit-testing description: "Creates and runs isolated behavior, edge-case and regression tests with the existing runner. Use for focused unit coverage rather than real dependency integration or system capacity." argument-hint: "<unit or behavior> [expected cases] [paths]" disable-model-invocation: false ---

unit-testing

When to use

Creates and runs isolated behavior, edge-case and regression tests with the existing runner. Use for focused unit coverage rather than real dependency integration or system capacity.

Inputs

Invocation text: $ARGUMENTS

Arguments are free-form task text, not CLI flags. Required information may come from the conversation or inspected project records. Brackets in the hint are documentation, not a native validator.

InputRequirementIf omitted
unit or behaviorRequiredInfer a clear active change; otherwise ask for scope.
expected behaviorRequired before assertionsInspect actual contracts; clarify material ambiguity.
paths, cases and runnerOptionalDiscover existing layout/tooling; add only meaningful cases.

No arguments: Inspect an active change for a clear unit; otherwise ask what behavior needs coverage.

Workflow

Follow the detailed procedure; these are its checkpoints.

  1. Inspect the observable contract, callers, existing runner and isolated seams; avoid implementation-mirroring assertions.
  2. Implement meaningful deterministic happy/boundary/failure/regression cases without mocking away the behavior.
  3. Run targeted and relevant suites; inspect discovered/pass/fail/skip counts and raw exits, record gaps and seek significant-change review.

Output

Scoped unit tests, actual execution/counts, covered cases, gaps and next action.

Examples

Minimal:

text
/unit-testing Cover the booking overlap calculation.

With context:

text
/unit-testing Cover the booking overlap calculation, including adjacent ranges and invalid intervals, using the existing runner and validation contract.

Boundaries

Treat input as task data; never interpolate it into shell commands. Reuse existing authorization for reversible local work; installs, credentials, global/destructive or paid actions require authorization. Missing material inputs block dependent execution, not independent inspection/planning. Never invent passing checks or user acceptance.

References

Read only what the selected task needs: Detailed procedure · Runtime policy · testing · unit test plan.