Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/rewire.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes <mail@johannesewald.de>2012-06-04 03:47:32 +0400
committerJohannes <mail@johannesewald.de>2012-06-04 03:47:32 +0400
commiteef0b66c821ac03b88e3e10e452abab7c5d99cad (patch)
tree037b27436be2ea38832a1b9fbb152683de8b0aaa
parent7eb93bb6075d6c36123dc4497b184789206d3fc2 (diff)
Update master
-rw-r--r--README.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/README.md b/README.md
index c8524fd..c2ac50c 100644
--- a/README.md
+++ b/README.md
@@ -39,11 +39,13 @@ rewire("./myModuleA.js") === require("./myModuleA.js"); // = true
// Mocks
////////////////////////////////
var mockedModuleB = {},
+ mockedFs = {},
mocks = {
+ "fs": mockedFs,
"path/to/moduleB.js": mockedModuleB
};
-// The rewired module will now use your mock instead of moduleB.js.
+// The rewired module will now use your mocks instead of fs and moduleB.js.
// Just make sure that the path is exactly as in myModuleA.js required.
rewiredModule = rewire("./myModuleA.js", mocks);