JS unit testing using dependency injection
rewire is a tool for helping us on overcoming these hurdles. It provides us an easy way to dependency injection for unit testing and adds a special setter and getter to modules so we can modify their behaviour for better unit testing. What rewire does is to not load the file and eval the contents to emulate the load mechanism.
To get started with dependency injection, we'll create a twitter rest api server and do unit tests using mocks and overriding variables within modules. This e