Replies: 1 comment 2 replies
-
You can already provide a mock store with an initial state. provideMockStore({
initialState: { books: { entities: [], status: 'success' } },
}), You can also update the state with See the testing docs for more info. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
My idea is to add a mock store state testing option as we have for actions testing
We have a possibility to mock Actions in effect by providing mock (stab) Observable
https://github.com/ngrx/platform/blob/master/modules/effects/testing/src/testing.ts
I want to have similar functionality for Store State
It can be an option to provide custom state in the existing
provideMockStore
https://github.com/ngrx/platform/blob/master/modules/store/testing/src/testing.ts
Or we can create a function with the name
provideMockStoreState
Beta Was this translation helpful? Give feedback.
All reactions