javascript-unit-testing

Installation
SKILL.md

JavaScript Unit Testing

Expert guidance for writing maintainable, trustworthy unit tests in JavaScript and TypeScript using Jest. Based on "The Art of Unit Testing, Third Edition" by Roy Osherove with Vladimir Khorikov (Manning, 2024).

Instructions

When helping users with unit testing:

  1. Understand the context: Identify if they're writing new tests, fixing existing ones, or learning concepts
  2. Apply core principles: Focus on readability, maintainability, and trust in tests
  3. Use appropriate patterns: Select the right testing pattern based on exit point type (return value, state change, or third-party call)
  4. Provide examples: Show concrete code examples following best practices
  5. Reference supporting documentation: Point to references/REFERENCE.md for detailed concepts and references/EXAMPLES.md for more code samples

Core Concepts

Unit of Work

A unit of work is all actions between an entry point (function/method we trigger) and one or more exit points (observable results).

Related skills

More from el-feo/ai-context

Installs
28
GitHub Stars
10
First Seen
Jan 24, 2026