Closed
Description
In the documentation it states that adding this in JEST would enable testing for ZUSTAND state.
const create = createState => {
const store = actualCreate(createState);
const initialState = store.getState();
storeResetFns.add(() => store.setState(initialState, true));
return store;
};
But it seems to throw an error "TypeError: store.getState is not a function"
I am using typescript not sure if this causes some issues. Also, it is not well documented on how to use this test in jest. Just want to have values on my states so that they can be used on my componentes during rendering of test components.
Metadata
Assignees
Labels
No labels