angular-redux / ng-redux

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

Can't find variable: Symbol in node_modules/ng-redux/dist/ng-redux.js #141

Closed raajamalik closed 7 years ago

raajamalik commented 7 years ago

Hello,

I am facing this issue while running testcases:

ReferenceError: Can't find variable: Symbol in node_modules/ng-redux/dist/ng-redux.js (line 1)

To be precise, it failed at the below highlighted line: this.createStoreWith = function(o, i, c, a) { ..... ..... }, this.$get = function(o) { for (var u = void 0, i = [], a = n, f = Array.isArray(a), s = 0, a = f ? a : a[Symbol.iterator]();;) {

I see a, the fourth argument to createStoreWith function is INITIAL state, which is not being passed in testcases. May be that is why it is failing here. Do, we have to mock this to run the testcases?

Also, if I mock ngRedux like below, then the test case pass:

$provide.value('$ngRedux', { subscribe: angular.noop, getState: function() { return { property: { loadedFiles: angular.noop, properties: angular.noop } }; } });

Somehow, it is not identifying Symbol. It used to run earlier. Any help would be much appreciated.

AntJanus commented 7 years ago

Should be fixed with 3.5.0