$ show Quick/Nimble
Nimble is a matcher framework for Swift and Objective-C that provides a domain-specific language for writing expressive test assertions. It supports both synchronous and asynchronous testing through expect()/require() APIs and includes extensive matchers for equality, identity, truthiness, collections, and async operations. The architecture features a core matcher protocol, DSL layer for expectation creation, adapters for different testing frameworks (XCTest, Swift Testing), and utilities for source location tracking and string conversion. The framework is designed exclusively for test suites and should not be included in production binaries.
The LLM identified 4 files worth highlighting for reuse:
Provides protocol-based string conversion for any type via StringConvertible, with default implementations for standard types. Enables descriptive failure messages in tests without boilerplate. Isolated (only Foundation dependency) and reusable in any project needing customizable object-to-string conversion for logging or diagnostics.
Encapsulates source code location capture using compiler directives (#fileID, #line) with fallback for Objective-C. Zero dependencies beyond Foundation, making it portable to any project requiring source tracking for logging, debugging, or testing frameworks. Demonstrates clean abstraction of a cross-cutting concern.
Implements a dispatcher that broadcasts assertions to multiple handlers using weak references. Decouples assertion production from consumption, enabling simultaneous support for multiple testing frameworks (e.g., XCTest and Swift Testing). Reusable pattern for any event multicasting scenario with minimal coupling (only Foundation).
Defines an AsyncSequence that yields periodic ticks at a specified interval, used for polling in asynchronous expectations. Composable with Swift concurrency primitives (for-await-loops) and encapsulates async timing logic. Isolated utility (Foundation only) applicable to any async polling or retry mechanism.