1 import queryPages from '../../lib/api/helpers/queryPages';
3 describe('query pages', () => {
4 it('should be able to process multiple pages', async () => {
5 const result = await queryPages(
18 return pages.map(({ Value }) => Value);
20 expect(result).toEqual([0, 1, 2, 3, 4]);
23 it('should return the first page without a total', async () => {
24 const result = await queryPages(
36 return pages.map(({ Value }) => Value);
38 expect(result).toEqual([0]);
41 it('should return several pages', async () => {
42 const result = await queryPages(
55 return pages.map(({ Value }) => Value);
57 expect(result).toEqual([0, 1]);