import { Store } from '@ngrx/store' ; import { MockStore } from '@ngrx/store/testing' ; param key param initialState param params export function createStore < S = object , P = object > ( key , initialState , params = { } ) { return { [ key ] : { ... initialState , ... params } } as any ; } param initialState param params export function createState < S = object > ( initialState , params = { } ) { return { ... initialState , ... params } ; } param store param key param initialState param params export function setMockStore < S = object , P = object > ( store , key , initialState , params = { } ) { ( store as MockStore ) . setState ( createStore ( key , initialState , params ) ) ; }