You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a scenario in which a method uses Store Helper to get State. When I try to test the function using the mock store which I have created, it uses the original store instance ( since it is in a helper file).
code.js
export const testFunction() {
const res = getValueFromHelper();
console.log(res);
}
const store = mockStore({ SomeReducer:{} })
console.log(store.getState().SomeReducer); // Here value is correct
testFunction(); // But here it returning original state value
The text was updated successfully, but these errors were encountered:
conststore=mockStore({SomeReducer:{}})console.log(store.getState().SomeReducer);// Here value is correcttestFunction(store);// But here it returning original state value
I have a scenario in which a method uses Store Helper to get State. When I try to test the function using the mock store which I have created, it uses the original store instance ( since it is in a helper file).
code.js
helper.js
code.test.js
The text was updated successfully, but these errors were encountered: