Write Unit Tests

Create comprehensive unit tests for current code with proper imports/setup per project testing conventions. Use when the user types /write-unit-tests.

blockmatic 8f39ffe 1.0 KB Updated

File contents

Purpose

Create comprehensive unit tests for current code with proper imports/setup per project testing conventions.

Steps

  1. Test Coverage: Test all public methods/functions, cover edge cases/error conditions, test positive/negative scenarios, aim for high coverage
  2. Test Structure: Use project's testing framework conventions, write clear descriptive test names, follow Arrange-Act-Assert pattern, group related tests logically
  3. Test Cases: Happy path scenarios, edge cases/boundary conditions, error handling/exception cases, mock external dependencies appropriately
  4. Test Quality: Make tests independent/isolated, ensure deterministic/repeatable, keep simple/focused, add helpful assertion messages

Completion

Read completion evidence before reporting completion.

blockmatic/basilic-skills/tree/main/skills/workflow/write-unit-tests commit 8f39ffe96a

Frequently asked questions

npx skillmds@latest add blockmatic/write-unit-tests