We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c25d77c commit c3220fdCopy full SHA for c3220fd
README.md
@@ -71,6 +71,15 @@ I have wrote some articles about these ideas - https://medium.com/tag/rewiremock
71
## helper functions
72
- rewuremock.stubFactory(factory) - define a stub factory for mockThrough command.
73
74
+ ### Automocking
75
+ Rewiremock supports (inspired by [Jest](https://facebook.github.io/jest/docs/en/manual-mocks.html)) auto `__mocks__`ing.
76
+ Just create `__mocks__/fileName.js`, and `fileName.js` will be replaced by mock. Please refer to Jest documentation for use cases.
77
+
78
+ If you dont want some file to be replaced by mock - add it, and then - disable
79
+```js
80
+ rewiremock('fileName.js').disable();
81
+```
82
83
# Which one?
84
Yep - there is 4 top level ways to activate a mock - inScope, around, proxy or just enable.
85
0 commit comments