import { getNextPageParamFromMeta } from '../../hooks/paginator_meta' describe('getNextPageParamFromMeta', () => { it.each([ [undefined, undefined], [{}, undefined], [{ idLt: '01ABC' }, { where: { id_lt: '01ABC' } }], [{ idLte: '01ABC' }, { where: { id_lte: '01ABC' } }], [{ idGt: '01ABC' }, { where: { id_gt: '01ABC' } }], [{ idGte: '01ABC' }, { where: { id_gte: '01ABC' } }], [{ offset: '40' }, { offset: 40 }], ])('maps %p to %p', (input, expected) => { expect(getNextPageParamFromMeta(input)).toEqual(expected) }) })