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
{{ message }}
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.
I have middleware that preserves values into local storage; it does not appear to fire up when events are called in a jest test.
middleware: [
(context) => { // save select values into session
console.log(' >>>>> middleware: context', context);
if (sessionStorage && context.state) {
for (let def of LOAD_STATES) {
putInSession(def.name, context.state[def.name] || null, def.type);
}
}
return context;
}
]
and in the test:
it('should set palette to a value', async () => {
expect.assertions(2);
await effects.choosePalette('black');
await Promise.resolve();
let state = getState();
expect(state.palette).toEqual('black');
console.log('mock store', mockStore); // an object my storageState uses to catch results of a mock local storage)
expect(mockStore.palette).toEqual('black');
});
this console.log(' >>>>> middleware: context', context); is not being called.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have middleware that preserves values into local storage; it does not appear to fire up when events are called in a jest test.
and in the test:
this
console.log(' >>>>> middleware: context', context);
is not being called.The text was updated successfully, but these errors were encountered: