mock-stdio provides a simple way to mock process.stdout and process.stderr streams within your Node.js tests. Redirect standard output and error to in-memory buffers, allowing you to easily assert on what your application is printing. Restore the original stdout and stderr streams when your tests are complete. Ideal for testing command-line tools and applications that rely on console output.