diff --git a/test/collections-rest/int.spec.ts b/test/collections-rest/int.spec.ts index e029e56aa..fffe890fb 100644 --- a/test/collections-rest/int.spec.ts +++ b/test/collections-rest/int.spec.ts @@ -639,7 +639,7 @@ describe('collections-rest', () => { }); expect(status).toEqual(200); - expect(result.totalDocs).toEqual(15); + expect(result.docs).toHaveLength(15); }); it('should query all docs when limit=0', async () => { diff --git a/test/helpers/rest.ts b/test/helpers/rest.ts index 41a2a53c5..67d4c2e75 100644 --- a/test/helpers/rest.ts +++ b/test/helpers/rest.ts @@ -155,8 +155,9 @@ export class RESTClient { const slug = args?.slug || this.defaultSlug; const whereQuery = qs.stringify({ - ...args, ...(args?.query ? { where: args.query } : {}), + limit: args?.limit, + page: args?.page, }, { addQueryPrefix: true, });