error-handling-test

Installation
SKILL.md

Error Handling Test Skill

Discovery

Before writing any tests, scan the target code for:

  • Explicit throwsthrow new Error(...), custom error classes, re-throws
  • Implicit throws — array/object destructuring on null, property access on undefined, calling non-functions
  • Async failure surfacesPromise.reject, async functions that throw, unhandled branches in .then() chains
  • Fallbacks — default values, catch blocks that return something, optional chaining with fallback (?? default), try/catch that swallows errors silently
  • Error propagation — does the function rethrow, wrap, or consume the error? Each behavior needs a different assertion

Non-Obvious Patterns to Cover

1. Assert the error type and message, not just that something throws

// WEAK — only verifies something threw
expect(() => fn()).toThrow();
Related skills

More from blunotech-dev/agents

Installs
1
GitHub Stars
2
First Seen
Apr 22, 2026