Socket
Socket
Sign inDemoInstall

mock-require

Package Overview
Dependencies
2
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.0 to 1.2.1

2

package.json
{
"name": "mock-require",
"version": "1.2.0",
"version": "1.2.1",
"description": "Simple, intuitive mocking of Node.js modules.",

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

@@ -1,12 +0,12 @@

#mock-require
# mock-require
####Simple, intuitive mocking of Node.js modules.
#### Simple, intuitive mocking of Node.js modules.
[![Build Status](https://travis-ci.org/boblauer/mock-require.svg)](https://travis-ci.org/boblauer/mock-require)
##About
## About
mock-require is useful if you want to mock `require` statements in Node.js. I wrote it because I wanted something with a straight-forward API that would let me mock anything, from a single exported function to a standard library.
##Usage
## Usage

@@ -24,5 +24,5 @@ ```javascript

##API
## API
###`mock(path, mockExport)`
### `mock(path, mockExport)`

@@ -70,3 +70,3 @@ __path__: `String`

###`mock.stop(path)`
### `mock.stop(path)`

@@ -92,3 +92,3 @@ __path__: `String`

###`mock.stopAll()`
### `mock.stopAll()`

@@ -113,3 +113,3 @@ This function can be used to remove all registered mocks without the need to remove them individually using `mock.stop()`.

##Test
## Test

@@ -116,0 +116,0 @@ ```

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc