Skip to content

Commit da4caf5

Browse files
author
NarrowsProjects
committed
chore: remove the needless 'limit' part of the rootOnly logs test
1 parent 88db5d8 commit da4caf5

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

test/api/logs.test.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -281,17 +281,14 @@ module.exports = () => {
281281
});
282282

283283
it('should successfully filter by rootOnly', async () => {
284-
// Limit is defined because filering by root only reduces the count by 5
285-
// and by default the limit is 100, for which would still return 100 as the total number of logs is 119
286-
// The latest 10 entries have 2 rows where rootLogId is not null
287-
const unfilteredResponse = await request(server).get('/api/logs?page[offset]=0&page[limit]=10');
284+
const unfilteredResponse = await request(server).get('/api/logs');
288285
expect(unfilteredResponse.status).to.equal(200);
289286

290287
// When a log has no rootLogId the logs adapter will set the row itself as the root log
291288
let hasChildLogs = unfilteredResponse.body.data.some(({ rootLogId, id }) => rootLogId !== id);
292289
expect(hasChildLogs).to.be.true;
293290

294-
const filteredResponse = await request(server).get('/api/logs?page[offset]=0&page[limit]=10&filter[rootOnly]=true');
291+
const filteredResponse = await request(server).get('/api/logs?filter[rootOnly]=true');
295292
expect(filteredResponse.status).to.equal(200);
296293

297294
hasChildLogs = filteredResponse.body.data.every(({ rootLogId, id }) => rootLogId !== id);

0 commit comments

Comments
 (0)