angular-redux / ng-redux

Angular bindings for Redux
MIT License
1.16k stars 177 forks source link

Proper way to use ngRedux in unit tests? #111

Open frankandrobot opened 7 years ago

frankandrobot commented 7 years ago

I would like to use the "real" ngRedux in tests, but the only way I've seen is to use a mock. For example,

beforeEach(angular.mock.module(function($provide) {
      $provide.service('$ngRedux', function() {
        this.connect = function() {
          return function() {
            return function(){}
          };
        };
      });

I'm in the middle of testing a hybrid Angular/Redux app where using the real ngRedux in unit tests would add a lot of value.

rperrote commented 7 years ago

+1