nullables

Replace real infrastructure with controlled Nullables during tests.

225|62|Updated Dec 29, 2025
One-click install
npx skills add https://github.com/lexler/skill-factory --skill nullables
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nullables
Source: https://github.com/lexler/skill-factory/tree/main/output_skills/testing/nullables
Command: npx skills add https://github.com/lexler/skill-factory --skill nullables

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Nullables provide production-like wrappers that run real code with controlled infrastructure I/O, letting tests exercise logic without brittle mocks and while keeping tests fast and deterministic.

Core Features & Use Cases

  • Sociable tests: run real code with nullified infra
  • Configurable responses: configure external system behavior at the caller's abstraction level
  • Output Tracking: observe what was written without performing real I/O
  • Embedded Stubs: embed minimal third-party behavior alongside wrappers
  • Use cases: testing code that interacts with HTTP, files, databases, clocks, and randomness, and migration from mocks

Quick Start

  1. Create a Nullable for a dependency using createNull()
  2. Use trackOutput() to observe results
  3. Run tests and verify outcomes

Frequently Asked Questions about nullables

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test code that interacts with external infrastructure without using mocks?

Testing without mocks is achievable by using Nullables, which replace real infrastructure with controlled wrappers. This lets you run production-like code and exercise logic fast and deterministically without brittle mocks.

How do I verify what my code writes to files or databases during tests?

To verify what code writes to files or databases, use Output Tracking. The trackOutput() utility observes written results without performing real I/O, keeping tests fast and deterministic.

How can I configure external system behavior like HTTP responses during testing?

You can configure external system behavior like HTTP responses using ConfigurableResponses. This allows you to define external system behavior at the caller's abstraction level within your tests.

What is the best way to migrate from mocks to sociable tests?

The best way to migrate from mocks to sociable tests is using Nullables. They support migration via ConfigurableResponses and Embedded Stubs, allowing tests to run real code with nullified infrastructure.

Can I test code with external I/O dependencies like clocks and randomness deterministically?

Yes, you can test code with external I/O dependencies like clocks and randomness deterministically. Nullables provide production-like wrappers to control infrastructure I/O during tests.