Fail Tests on Console Output
JSON →console-fail-test is a utility library designed to enforce clean testing practices by automatically failing individual test runs if any console methods (e.g., console.log, console.warn, console.error) are invoked during their execution. The current stable version is 0.6.1, with a release cadence that focuses on minor updates for dependency maintenance, bug fixes, and broader test runner compatibility. A key differentiator is its framework-agnostic integration through a setup file, supporting popular test runners like Jest, Vitest, Mocha, and Ava. It provides detailed summaries of all console calls, including arguments, upon test failure, helping developers quickly identify and rectify unintended outputs. The library ensures that failures are reported *after* tests complete, allowing other test failures to surface normally, preventing test suites from passing when they shouldn't due to overlooked console messages. It's strictly ESM-only since version 0.6.0 and requires Node.js >=20.19.0.
Traffic · last 30 days ↑0% vs prev 7d
top countries 🇺🇸 United States · 🇸🇬 Singapore · 🇩🇪 Germany · 🇨🇦 Canada · 🇫🇷 France