Don't build a complex DI system just to enable testing, that's madness.

commonJS and require is great. If you really must swap out the dependencies
loaded through require for testing purposes then use a mocking tool to do
just that

For example https://github.com/Colingo/mock which is different from the
above because it works in browsers and doesn't run the code in a new vm.

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to