Message from JavaScript discussions

August 2018

— You go from:
(dependencies) -> yourModule


The purpose of dependency injection is in most cases testability, so you really only need to inject dependencies that talk to the outside world (console, network, db, fs)

— It's the case, Is for testability

— I undestand

— That's all you need

— Instead of using require inside the module file, you do it outside the module and pass it in

— And for testing, you pass something else in

— Thank you TRGWII

— I love home office

— Home laboratory

— 😄

— Mi casa