How to initialize root store in angular-redux/store for testing?

181 Views Asked by At

I want to set the initial root Store for angular redux instead of calling getSelectorStub for one selector at a time. What's the best way to do this?

1

There are 1 best solutions below

0
Pankaj On

StoreModule.forRoot() contains an optional configuration object as input parameter.

 StoreModule.forRoot(reducers, {
      initialState: {} // <---- provide initial state
 }