The right way to mock dependencies in Node.js or webpack environment.
-
Updated
May 18, 2025 - JavaScript
The right way to mock dependencies in Node.js or webpack environment.
A demo project on how to test a node/express app with Mocha, Nock and proxyquire (MNP) and code coverage with nyc/istanbul.
'Immutable' NodeJS module mocking (CJS) for unit testing purposes. Similar to proxyquire, but simpler and safer. Sponsored by https://aeroview.io