{"action":"opened","issue":{"url":"https://api.github.com/repos/angular-redux/store/issues/470","repository_url":"https://api.github.com/repos/angular-redux/store","labels_url":"https://api.github.com/repos/angular-redux/store/issues/470/labels{/name}","comments_url":"https://api.github.com/repos/angular-redux/store/issues/470/comments","events_url":"https://api.github.com/repos/angular-redux/store/issues/470/events","html_url":"https://github.com/angular-redux/store/issues/470","id":265322976,"number":470,"title":"Setup initial state for testing","user":{"login":"galan83","id":854201,"avatar_url":"https://avatars3.githubusercontent.com/u/854201?v=4","gravatar_id":"","url":"https://api.github.com/users/galan83","html_url":"https://github.com/galan83","followers_url":"https://api.github.com/users/galan83/followers","following_url":"https://api.github.com/users/galan83/following{/other_user}","gists_url":"https://api.github.com/users/galan83/gists{/gist_id}","starred_url":"https://api.github.com/users/galan83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/galan83/subscriptions","organizations_url":"https://api.github.com/users/galan83/orgs","repos_url":"https://api.github.com/users/galan83/repos","events_url":"https://api.github.com/users/galan83/events{/privacy}","received_events_url":"https://api.github.com/users/galan83/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-13T15:09:43Z","updated_at":"2017-10-13T15:09:43Z","closed_at":null,"author_association":"NONE","body":"### This is a...\r\n\r\n* [ ] feature request\r\n* [ ] bug report\r\n* [x ] usage question\r\n\r\n### What toolchain are you using for transpilation/bundling?\r\n\r\n* [x] @angular/cli\r\n* [ ] Custom @ngTools/webpack\r\n* [ ] Raw `ngc`\r\n* [ ] SystemJS\r\n* [] Rollup\r\n* [ ] Other\r\n\r\n### Environment\r\n\r\nNodeJS Version: 8.6.0\r\nTypescript Version: 2.5.2\r\nAngular Version: 4.4\r\n@angular-redux/store version: 6.5.7\r\n@angular/cli version: (if applicable) 1.3.2\r\nOS: OSX 10.12.5\r\n\r\nI would like to know how can I setup the initial state in my tests.\r\n\r\nThis is how I build the module for the test:\r\n\r\n` \r\nbeforeEach(async(() => {\r\n    TestBed.configureTestingModule({\r\n      declarations: [ ChartTypeComponent ],\r\n      imports: [\r\n        NgReduxTestingModule,\r\n        TranslateModule.forRoot({\r\n          loader: {provide: TranslateLoader, useClass: FakeLoader},\r\n        })\r\n      ],\r\n      schemas: [ NO_ERRORS_SCHEMA ],\r\n      providers: [\r\n        ControlActions,\r\n        TranslateService\r\n      ]\r\n    })\r\n      .compileComponents();\r\n    MockNgRedux.reset();\r\n  }));\r\n`\r\nI have tried to provide a MockNgRedux to the providers sections:\r\n`{ provide: NgRedux, useValue: MockNgRedux.getInstance().configureStore(MyReducers, Initial_state, [], []) }`\r\n\r\nAre there any example of how to setup initial state and reducers for test?\r\n\r\n\r\nThanks in advance.\r\n\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"galan83"}}