chore: fixes test expectation

This commit is contained in:
Jarrod Flesch
2022-12-01 12:17:47 -05:00
parent 226c7d5da5
commit e6bda625b4
2 changed files with 3 additions and 2 deletions

View File

@@ -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 () => {

View File

@@ -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,
});