I have tests that keep failing and throwing the following error:
createSelector expects all input-selectors to be functions, but received the following types: [undefined, function memoized()]
I have realised it is because of this function that the error is being thrown:
export const rejectedConsignmentEventsToMapOfConsignmentIdsToEventMap = createImmutableEqualSelector( eventsSelector, (events) => events .filter((ce) => ce.get('type') === EventType.REJECTED) .valueSeq() .groupBy((it) => it.get('packageId')) )
I am not sure why is this causing an issue, when the following function that looks pretty much the same is not:
export const eventsToMapOfPackageIdsToEventMap = createImmutableEqualSelector( eventsSelector, (events) => events.valueSeq().groupBy((it) => it.get('packageId')) )
When I am running my app, everything works fine and as expected, no errors are thrown, only when I am running tests I get this error. What am I doing wrong here with the first function, why it is causing this error?