error-handling-test

Installation
SKILL.md

Error Handling Test Skill

Discovery

Before writing any tests, scan the target code for:

  • Explicit throws — throw new Error(...), custom error classes, re-throws
  • Implicit throws — array/object destructuring on null, property access on undefined, calling non-functions
  • Async failure surfaces — Promise.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();
Installs
3
GitHub Stars
2
First Seen
Apr 22, 2026
error-handling-test — blunotech-dev/agents