Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mock-stdio

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mock-stdio - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "mock-stdio",
"version": "1.0.0",
"version": "1.0.1",
"description": "mock stdio output for tests",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -22,4 +22,10 @@ # mock-stdio

This is just a simple module allowing you to easiy test (or just ignore) code that needs to `console.log` or otherwise write to standard out and standard error.
This is just a simple module allowing you to easily test (or just ignore) code that needs to `console.log` or otherwise write to standard out and standard error.
## Install
```bash
npm install --save-dev mock-stdio
```
## Example

@@ -53,2 +59,2 @@

Note that is is best to use the mock directly inside the test, rather than in `before` or `after` functions, as it will not be possible for anything within the node process to log to `stdout` and `stderr`, meaning you may lose messages that are printed by your test framework.
Note that it is best to use the mock directly inside the test, rather than in `before` or `after` functions, as it will not be possible for anything within the node process to log to `stdout` and `stderr`, meaning you may lose messages that are printed by your test framework.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc