4 ms·
This is not necessarily true. Dependency injection allows you to provide your own implementations for unit testing. I'm surprised we're still talking about depe
by dimgl 5y ago
This is not necessarily true. Dependency injection allows you to provide your own implementations for unit testing. I'm surprised we're still talking about dependency injection in Node.js. I made a really crude dependency injection library for Node six years ago.
https://github.com/divmgl/nwire https://github.com/divmgl/nwire
- pumpkinman 5y agoBut you can just mock the singleton