i am new in ngrx, we have angular proj which is usig ngrx storing/state the data. and now i have to write a test case for the all action, reducer and other code. but i am stuck in writing test cases for the actions. looked in google but no help found.
export enum ProjAction {
INSERT_RECORD = "[ProjAction] Insert a record."
}
export class ProjActionCreator(private store: Store<ProjState>) {
insertRecord(data: any) {
this.store.dispatch(<Action>{
type: ProjAction.INSERT_RECORD,
payload: data
})
}
}
i tried to make a spy object and dispatch but it won't help for me. any help will appreciated.