Skip to content

Commit

Permalink
Fix off by one in mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
kqualters-elastic committed Oct 5, 2020
1 parent ceb4363 commit bef65d3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function oneNodeWithPaginatedEvents(): {
if (after === undefined) {
events = eventsOfCategory.slice(0, relatedEventsPaginationSize);
} else {
events = eventsOfCategory.slice(relatedEventsPaginationSize - 1);
events = eventsOfCategory.slice(relatedEventsPaginationSize);
}
return {
events,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ export const isLoadingMoreNodeEventsInCategory = createSelector(
return (
nodeEventsInCategory &&
nodeEventsInCategory.lastCursorRequested !== null &&
nodeEventsInCategory.cursor !== nodeEventsInCategory.lastCursorRequested
nodeEventsInCategory.cursor === nodeEventsInCategory.lastCursorRequested
);
} else {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ describe(`Resolver: when analyzing a tree with only the origin and paginated rel
() =>
simulator().testSubject('resolver:panel:node-events-in-category:event-link').length
)
).toYieldEqualTo(31);
).toYieldEqualTo(30);
});
});
});
Expand Down

0 comments on commit bef65d3

Please sign in to comment.