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

rewiremock

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rewiremock - npm Package Compare versions

Comparing version 1.3.3 to 1.3.4

18

package.json
{
"name": "rewiremock",
"version": "1.3.3",
"description": "Easy and es6 compatible mocking tool",
"version": "1.3.4",
"description": "Easy and es6 compatible di/mocking tool.",
"main": "lib/index.js",

@@ -17,6 +17,14 @@ "module": "src/index.js",

"keywords": [
"es6",
"require",
"dependency",
"injection",
"dependency injection",
"mock dependency",
"di",
"inject",
"swap",
"test",
"mock",
"es6",
"javascript",
"node.js"
"stub"
],

@@ -23,0 +31,0 @@ "author": "Anton Korzunov (thekashey@gmail.com)",

@@ -11,3 +11,4 @@ # rewiremock [![Build Status](https://secure.travis-ci.org/theKashey/rewiremock.svg)](http://travis-ci.org/theKashey/rewiremock)

By its nature rewiremock has same behavior as Mockery. But it can behave like others too.
It covers _any_ cases.
It covers _any_ cases. It is the right way to mock your dependencies or perform dependency injection.

@@ -19,12 +20,8 @@ Rewiremock is an evolution of lessons I learned from:

Rewiremock was initially named as mockImports or mockModule. But was renamed to RewireMock.
We shall not use that name, but [rewire](https://github.com/jhnns/rewire) - is one of existing mocking libraries.
# Ideology
- be simple
- be modular
- be secure
- be fast
- be right, and enable `true` testing experience.
- be simple, and ease to use.
- be modular, to cover all cases.
- be secure, and isolate target under test.
- be fast, to be faster.

@@ -116,7 +113,9 @@ # API

rewiremock.enable();
// is 'something' mocked? Yes
....
rewiremock.disable();
// is 'something' mocked? Yes
// is 'something' mocked? No
// is it still listed as mock? Yes
});
// is 'something' mocked? No
// is 'something' mocked or listed? No
```

@@ -295,2 +294,5 @@

# Wanna read something about?
[Rewiremock - medium article](https://medium.com/@antonkorzunov/how-to-mock-dependency-in-a-node-js-and-why-2ad4386f6587)
# Licence

@@ -297,0 +299,0 @@ MIT

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