Pino Test Utilities
JSON →pino-test is a utility library designed to simplify the process of testing applications that use the Pino logger. It provides a `sink()` method to create a transform stream that captures Pino's JSON log output, allowing for easy inspection and assertion within test suites. The library also offers `once()` and `consecutive()` helpers to assert single or multiple log entries against expected values, optionally with custom assertion functions. The current stable version is 2.0.0, which includes code modernization and drops support for older Node.js versions. While its release cadence isn't strictly fixed, major versions appear to be released as significant updates or breaking changes warrant, with v2.0.0 following v1.0.0 after some time. It differentiates itself by tightly integrating with Pino's stream-based logging for efficient and precise log verification without complex mock setups.
Traffic · last 30 days ↓33% vs prev 7d
top countries 🇺🇸 United States · 🇳🇴 Norway · 🇷🇺 Russia · 🇨🇦 Canada · 🇩🇪 Germany