diff --git a/README.md b/README.md index baad8f6..3d8a4c7 100644 --- a/README.md +++ b/README.md @@ -59,8 +59,12 @@ The testing framework of choice is [Mocha](https://mochajs.org/). Call `npm run There are 2 ways in which mocks are defined/used: -0. for external modules, in [mocks](mocks), uses the [rewiremock](https://github.com/theKashey/rewiremock) package; use this only when there is some magic happening like for electron which normally runs in its own node process -1. for own modules, just beside their test file in [tests](tests); name the file `*.mock.ts` and use other files for orientation; use sparingly and only when not having a mock makes it more complex e.g. for modules which interact with the file system +0. for external modules, in [mocks](mocks) + - uses the [rewiremock](https://github.com/theKashey/rewiremock) package + - use this only when there is some magic happening like for electron which normally runs in its own node process +1. for own modules, just beside their test file in [tests](tests) + - name the file `*.mock.ts` and use existing mock files for orientation on how to build them + - use sparingly and only when not having a mock makes it more complex e.g. for modules which interact with the file system #### Tagging