scottcorgan / Injector

Node.js directory-independent dependency injection for apps and testing.
36 stars 1 forks source link

test mode #28

Closed scottcorgan closed 11 years ago

scottcorgan commented 11 years ago

A mode that doesn't instantiate the module on bootstrap. This will allow us to inject mocked dependencies for testing.

scottcorgan commented 11 years ago

Pass this on on app creation

mock: {
        cache: {
          bootstrapped: function () {

          },
          deps: {
            reds: fakeredis
          }
        }
}