See https://github.com/stipsan/ioredis-mock/blob/main/src/commands-utils/scan-command.common.js#L55 The start cursor may not accurately point to the "end" index of the last iteration when elements were removed in between calls.