rewiremock
Advanced tools
Comparing version 1.3.3 to 1.3.4
{ | ||
"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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
110951
300