Within my Reducer file:
case PumpActionTypes.EnterLocalMode:
return commandOne.upsertOne(
{id: action.payload.id, changes: { local: false }},
state
);
When testing, I aim to verify that the local
property is indeed modified to false.
My current implementation is as follows:
describe('EnterLocalMode action', () => {
it('should handle Enter Local Mode from Remote Mode', () => {
const {initialState} = MyReducer;
const action = new MyActions.EnterLocalMode();
const state = MyReducer.reducer(initialState, action);
//Verifying that the changes in pump adaptor change to "local" = true
expect(MyReducer.commandOne.upsertOne(changes:{local})).toEqual(true);
});
});
Nevertheless, I'm uncertain about how to formulate my expect statement correctly. The current version is inaccurate:
expect(MyReducer.commandOne.upsertOne(changes:{local})).toEqual(true);